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-20T01:54:45Z
Lists: pgsql-bugs
On Sat, May 18, 2019 at 01:07:15PM -0400, Tom Lane wrote: > I've not worked that out in any detail; getting the switches included > properly might be too much of a pain for this to be an improvement. > But for sure I don't want there to be multiple copies of that list of > which subprocess types use shared memory. Getting rid of the process list dependency would be nice. > A variant idea is to include shared_memory_exists in what's passed down > by the BackendParameters mechanism, and then subprocesses can adjust > their behavior for themselves. I actually got to think about having extra switches to control the re-attachment of sub-processes when thinking about a solution, and I agree that it would be much cleaner. The idea about using backend parameters is interesting (I haven't considered it), though I feel that this could introduce race conditions as the process startup scheduling can cause tricky issues on Windows, so I think that this would make the system less robust. Using a state specific to the postmaster for the decision-making ensures a single entry point. > In any case, the thrust of all of this is that we shouldn't touch any > of the assertions in the shmem support files; rather, the way to fix > it is to improve the logic in postmaster.c so that we don't call those > functions at all in child processes that are launched before shmem > exists. I certainly agree with that. Those assertions are here to stay. -- 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