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 1i84py-0007Xc-T6 for pgsql-bugs@arkaria.postgresql.org; Wed, 11 Sep 2019 15:47:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1i84px-0005Io-QM for pgsql-bugs@arkaria.postgresql.org; Wed, 11 Sep 2019 15:47:17 +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 1i84px-00052p-Bd for pgsql-bugs@lists.postgresql.org; Wed, 11 Sep 2019 15:47: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_SHA1:256) (Exim 4.92) (envelope-from ) id 1i84pu-00021f-VI for pgsql-bugs@lists.postgresql.org; Wed, 11 Sep 2019 15:47:16 +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 x8BFl7UE004025; Wed, 11 Sep 2019 11:47:07 -0400 From: Tom Lane To: Michael Paquier cc: Andrew Dunstan , Andres Freund , Peter Eisentraut , Yuli Khodorkovskiy , pgsql-bugs@lists.postgresql.org Subject: Re: BUG #15804: Assertion failure when using logging_collector with EXEC_BACKEND In-reply-to: <20190911021641.GC1953@paquier.xyz> References: <16df9d01-8b03-2664-a18c-16c40186f5ab@2ndQuadrant.com> <2702.1558289980@sss.pgh.pa.us> <20190520012728.GC1923@paquier.xyz> <1664.1558325417@sss.pgh.pa.us> <7927.1558364465@sss.pgh.pa.us> <31457.1568057723@sss.pgh.pa.us> <20190910051115.GB22934@paquier.xyz> <6728.1568093331@sss.pgh.pa.us> <20190910053923.GC11737@paquier.xyz> <20705.1568127532@sss.pgh.pa.us> <20190911021641.GC1953@paquier.xyz> Comments: In-reply-to Michael Paquier message dated "Wed, 11 Sep 2019 11:16:41 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <4023.1568216827.1@sss.pgh.pa.us> Date: Wed, 11 Sep 2019 11:47:07 -0400 Message-ID: <4024.1568216827@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Michael Paquier writes: > On Tue, Sep 10, 2019 at 10:58:52AM -0400, Tom Lane wrote: >> Here's a version that does it like that. After studying things a bit, >> it seemed like a good idea to also move RemovePgTempFiles() down, >> so that that possibly-slow step still occurs after making the external >> PID file. Everything else that we've moved to before that step >> should be reasonably quick. > Good point. Nothing more to add with this version. Thanks for > caring. I did one final round of testing and noted that in a Linux EXEC_BACKEND build, this last change causes the race condition that was noted upthread: RemovePgTempFiles could remove the parameter file that the syslogger process is supposed to consume. So I split off the clearing of that subdirectory as we'd discussed, and pushed it. Thanks for reviewing! regards, tom lane