Re: BUG #15804: Assertion failure when using logging_collector with EXEC_BACKEND
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Yuli Khodorkovskiy <yuli.khodorkovskiy@crunchydata.com>, pgsql-bugs@lists.postgresql.org, Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Date: 2019-05-16T04:36:18Z
Lists: pgsql-bugs
On Thu, May 16, 2019 at 12:56:17PM +0900, Michael Paquier wrote: > The test is able to pass, but we have a race condition between the > moment the backend file gets saved and the moment we allow it to be > read. I have not spent much time checking the stack between > InitializeMaxBackends() and RemovePgTempFiles() in postmaster.c, but > 57431a9 triggers the failure. Oh, I think I got it. The issue is that we call RemovePgTempFiles() after starting the syslogger. This cannot be run with other processes running in parallel, and with EXEC_BACKEND there is the extra case where we have a pgsql_tmp/ at the root of the data folder, so the syslogger complains on that. By making RemovePgTempFiles() happen before starting the syslogger, then the test complains again about the assertion without my previous patch applied of course. With the patch applied, I get no complains. -- Michael
Commits
-
Rearrange postmaster's startup sequence for better syslogger results.
- 9a86f03b4e8c 13.0 landed
-
Improve logrotate test so that it meaningfully exercises syslogger.
- 9d5c22d28f8c 12.0 landed
-
Revert "postmaster: Start syslogger earlier".
- 833451552925 12.0 landed
-
postmaster: Start syslogger earlier
- 57431a911d3a 12.0 cited