Re: BUG #15804: Assertion failure when using logging_collector with EXEC_BACKEND
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Yuli Khodorkovskiy <yuli.khodorkovskiy@crunchydata.com>
Cc: pgsql-bugs@lists.postgresql.org,
Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Date: 2019-05-14T19:52:04Z
Lists: pgsql-bugs
Yuli Khodorkovskiy <yuli.khodorkovskiy@crunchydata.com> writes: > Attached is a patch that fixes the issue in the bug report. I do not think this is a very good way to fix it (even assuming that it works, which I'm unsure of --- in particular, doing this would alter the order of changes to postmaster.pid, possibly breaking pg_ctl or other tools that look at that file). The whole point of commit 57431a911 was to switch to log-collector logging before we've done anything very interesting, and that would surely include shmem setup. I'm a bit surprised actually that Peter didn't move the SysLogger_Start call even further up; in principle it ought to be safe to do it as soon as we have the data directory lock file. It might be better to give up the assertion in PGSharedMemoryNoReAttach, and just make it work more like PGSharedMemoryDetach, ie "detach if UsedShmemSegAddr is set, else do nothing". I don't remember for sure, but if we do that, there might be no functional difference anymore between those two functions, in which case we might as well merge 'em. regards, tom lane
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