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: Andrew Dunstan <andrew.dunstan@2ndquadrant.com>, Andres Freund <andres@anarazel.de>, Peter Eisentraut <peter.eisentraut@2ndquadrant.com>, Yuli Khodorkovskiy <yuli.khodorkovskiy@crunchydata.com>, pgsql-bugs@lists.postgresql.org
Date: 2019-09-10T05:11:15Z
Lists: pgsql-bugs
On Mon, Sep 09, 2019 at 03:35:23PM -0400, Tom Lane wrote:
> I think this probably is committable now, though of course it'd
> be good for somebody to review it (and maybe test on Windows
> before it hits the buildfarm?)

I have looked at the patch and tested it a bit on Windows with MSVC
(TAP, bincheck, etc.), and the logic looks fine.  Thanks.

Do we need to worry about the port being opened after the external PID
file is written though?  With some imagination it is possible to
imagine that some folks rely on the external PID file to be present
before attempting to access Postgres when not using pg_ctl.  Still, I
would discard that as postmaster.pid gets written before opening the
port already.
--
Michael

Commits

  1. Rearrange postmaster's startup sequence for better syslogger results.

  2. Improve logrotate test so that it meaningfully exercises syslogger.

  3. Revert "postmaster: Start syslogger earlier".

  4. postmaster: Start syslogger earlier