]> granicus.if.org Git - postgresql/commit
Make logging_collector=on work with non-windows EXEC_BACKEND again.
authorAndres Freund <andres@anarazel.de>
Tue, 13 Jan 2015 20:02:47 +0000 (21:02 +0100)
committerAndres Freund <andres@anarazel.de>
Tue, 13 Jan 2015 23:14:53 +0000 (00:14 +0100)
commitcc7a3a45a8d861caa0807af7280277d38f9bf85a
tree7b8cb3306ab7d4c9258bc18a83762a206a3c8c53
parent71942a8b3ad516251cc1ba87362917a6614ee435
Make logging_collector=on work with non-windows EXEC_BACKEND again.

Commit b94ce6e80 reordered postmaster's startup sequence so that the
tempfile directory is only cleaned up after all the necessary state
for pg_ctl is collected.  Unfortunately the chosen location is after
the syslogger has been started; which normally is fine, except for
!WIN32 EXEC_BACKEND builds, which pass information to children via
files in the temp directory.

Move the call to RemovePgTempFiles() to just before the syslogger has
started. That's the first child we fork.

Luckily EXEC_BACKEND is pretty much only used by endusers on windows,
which has a separate method to pass information to children. That
means the real world impact of this bug is very small.

Discussion: 20150113182344.GF12272@alap3.anarazel.de

Backpatch to 9.1, just as the previous commit was.
src/backend/postmaster/postmaster.c