Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bnRCi-0004y7-W8 for pgsql-hackers@arkaria.postgresql.org; Fri, 23 Sep 2016 14:11:53 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bnRCi-0000k5-Il for pgsql-hackers@arkaria.postgresql.org; Fri, 23 Sep 2016 14:11:52 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bnRCg-0000iT-MN for pgsql-hackers@postgresql.org; Fri, 23 Sep 2016 14:11:50 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bnRCd-0008Pa-Uf for pgsql-hackers@postgresql.org; Fri, 23 Sep 2016 14:11:50 +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 u8NEBg4U012625; Fri, 23 Sep 2016 10:11:42 -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_Re=3A_=5BHACKERS=5D_Windows_service_is_not_start?= =?UTF-8?Q?ing_so_there=E2=80=99s_message_in_log=3A_FATAL=3A_=22could_not_create_sh?= =?UTF-8?Q?ared_memory_segment_=E2=80=9CGlobal=2FPostgreSQL=2E851401618=E2=80=9D=3A_Permi?= =?UTF-8?Q?ssion_denied=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> ! <29726.1474564208@sss.pgh.pa.us> Comments: In-reply-to Amit Kapila message dated "Fri, 23 Sep 2016 15:27:54 +0530" Date: Fri, 23 Sep 2016 10:11:42 -0400 Message-ID: <12624.1474639902@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: > Attached patch tightens the error handling. However, on debugging, I > found that CreateFileMapping() always set error code to 0 on success. Ah, interesting. > Now, it is quite possible > that error code is set to 0 on success in my windows environment > (Win7) and doesn't work in some other environment. In any case, if we > want to go ahead and don't want to rely on CreateFileMapping(), then > attached patch should suffice the need. Yeah, seeing that this is not mentioned in MS' documentation I don't think we should rely on it. The patch looks fine to me, pushed. 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