Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bn7XF-0003E5-2W for pgsql-hackers@arkaria.postgresql.org; Thu, 22 Sep 2016 17:11:45 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bn7XE-0000LB-FT for pgsql-hackers@arkaria.postgresql.org; Thu, 22 Sep 2016 17:11:44 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bn7Vp-0007BV-3l for pgsql-hackers@postgresql.org; Thu, 22 Sep 2016 17:10:17 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bn7Vm-0006GZ-Nb for pgsql-hackers@postgresql.org; Thu, 22 Sep 2016 17:10:15 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u8MHA8aL029727; Thu, 22 Sep 2016 13:10:08 -0400 From: Tom Lane To: Amit Kapila cc: Robert Haas , Michael Paquier , Haribabu Kommi , Dmitry Vasilyev , pgsql-hackers Subject: Re: =?UTF-8?Q?Re=3A_=5BHACKERS=5D_Re=3A_=5BHACKERS=5D_Re=3A_=5BHACKERS=5D_Re=3A_=5BHACKE?= =?UTF-8?Q?RS=5D_Re=3A_=5BHACKERS=5D_Windows_service_is_not_starting_so_there?= =?UTF-8?Q?=E2=80=99s_message_in_log=3A_FATAL=3A_=22could_not_create_shared_memory_?= =?UTF-8?Q?segment_=E2=80=9CGlobal=2FPostgreSQL=2E851401618=E2=80=9D=3A_Permission_denied?= =?UTF-8?Q?=E2=80=9D?= In-reply-to: References: <1444920387.3661.7.camel@postgrespro.ru> <1444921511.3661.13.camel@postgrespro.ru> <31461.1445090619@sss.pgh.pa.us> <20811.1474390987@sss.pgh.pa.us> Comments: In-reply-to Amit Kapila message dated "Wed, 21 Sep 2016 15:19:17 +0530" Date: Thu, 22 Sep 2016 13:10:08 -0400 Message-ID: <29726.1474564208@sss.pgh.pa.us> X-Pg-Spam-Score: -5.0 (-----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Amit Kapila writes: > On Tue, Sep 20, 2016 at 10:33 PM, Tom Lane wrote: >> ISTM both the previous coding and this version can fail for no good >> reason, that is what if GetLastError() happens to return one of these >> error codes as a result of some unrelated failure from before this >> subroutine is entered? That is, wouldn't it be a good idea to >> do SetLastError(0) before calling CreateFileMapping? > Yes, that seems like a good idea. Do you need a patch with some > testing on windows environment? Please; I can't test it. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers