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 1hSQPW-0005c5-G3 for pgsql-bugs@arkaria.postgresql.org; Sun, 19 May 2019 18:19:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hSQPV-00069i-5h for pgsql-bugs@arkaria.postgresql.org; Sun, 19 May 2019 18:19:49 +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 1hSQPU-00069S-QQ for pgsql-bugs@lists.postgresql.org; Sun, 19 May 2019 18:19:48 +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.89) (envelope-from ) id 1hSQPS-0002Bl-Dk for pgsql-bugs@lists.postgresql.org; Sun, 19 May 2019 18:19:47 +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 x4JIJeoP002703; Sun, 19 May 2019 14:19:40 -0400 From: Tom Lane To: Andrew Dunstan cc: Michael Paquier , 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: <16df9d01-8b03-2664-a18c-16c40186f5ab@2ndQuadrant.com> References: <20190516021903.GB1415@paquier.xyz> <28927.1557977558@sss.pgh.pa.us> <20190516035617.GC1415@paquier.xyz> <20190516043618.GD1415@paquier.xyz> <31437.1557982294@sss.pgh.pa.us> <20190516060628.GE1415@paquier.xyz> <20190517042536.GM20887@paquier.xyz> <20190517202443.gw4zdfkpwgsjdel6@alap3.anarazel.de> <20190518093522.GA19212@paquier.xyz> <28565.1558196308@sss.pgh.pa.us> <20190519004344.GA3653@paquier.xyz> <22995.1558278322@sss.pgh.pa.us> <27719.1558282181@sss.pgh.pa.us> <16df9d01-8b03-2664-a18c-16c40186f5ab@2ndQuadrant.com> Comments: In-reply-to Andrew Dunstan message dated "Sun, 19 May 2019 12:42:27 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2701.1558289980.1@sss.pgh.pa.us> Date: Sun, 19 May 2019 14:19:40 -0400 Message-ID: <2702.1558289980@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Andrew Dunstan writes: > On 5/19/19 12:09 PM, Tom Lane wrote: >> Given the current unpleasantness, I think it's quite important that >> we fix 004_logrotate.pl so that it (a) poses an end-to-end test >> and (b) works on Windows. I think (a) could be managed by having >> the test execute guaranteed-to-fail SQL commands ("select 1/0" or >> the like) and making it look into the log file to verify that the >> expected error messages appear there. (b) is a little harder in >> view of Andrew's point that we can't just summarily rename or unlink >> the log file. But I don't much like using a fixed log file name >> in the test anyway. I propose that we let it use the default logfile >> pattern (postgresql-%Y-%m-%d_%H%M%S.log), and that we just sleep for a >> couple of seconds before requesting rotation, and that we verify that >> the file name actually changed. We can avoid difficult issues of >> guessing what file name got used by having the test script look into >> "current_logfiles" to get the name --- which is another feature that >> there's exactly zero test coverage of right now, so that seems like >> a win all around. > Worth a try. Done. I went ahead and pushed it, but if the buildfarm shows any sign of unhappiness I'll just revert it. regards, tom lane