Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iinRg-0003sP-Dt for pgsql-bugs@arkaria.postgresql.org; Sat, 21 Dec 2019 22:42:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iinRf-0005Wf-8M for pgsql-bugs@arkaria.postgresql.org; Sat, 21 Dec 2019 22:41:59 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iinRe-0005WW-Sm for pgsql-bugs@lists.postgresql.org; Sat, 21 Dec 2019 22:41:59 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iinRa-0006Xp-Sr for pgsql-bugs@lists.postgresql.org; Sat, 21 Dec 2019 22:41:57 +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 xBLMfqTa004105; Sat, 21 Dec 2019 17:41:52 -0500 From: Tom Lane To: Alexander Lakhin cc: Kyotaro Horiguchi , pgsql-bugs@lists.postgresql.org Subject: Re: BUG #16161: pg_ctl stop fails sometimes (on Windows) In-reply-to: <5c7eaa87-8670-2008-3a15-337c133c12c2@gmail.com> References: <4741.1576684991@sss.pgh.pa.us> <26441.1576706955@sss.pgh.pa.us> <20191219.103948.2182167132387989763.horikyota.ntt@gmail.com> <32374.1576770248@sss.pgh.pa.us> <5c7eaa87-8670-2008-3a15-337c133c12c2@gmail.com> Comments: In-reply-to Alexander Lakhin message dated "Thu, 19 Dec 2019 23:00:00 +0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <4098.1576968112.1@sss.pgh.pa.us> Date: Sat, 21 Dec 2019 17:41:52 -0500 Message-ID: <4104.1576968112@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Alexander Lakhin writes: > 19.12.2019 18:44, Tom Lane wrote: >> Entirely-untested patch along this line attached. > I have tested it with my demo restart test and it works. Yes, stat() is > resulted in the CreateFile() call too, so it should fail the same way. Since this patch seems to fix the problem, I went ahead and pushed it. We can still consider whether it can be improved, but I was getting antsy about leaving the buildfarm broken. regards, tom lane