Re: EXEC_BACKEND + logging_collector=on is broken - Mailing list pgsql-hackers

From Magnus Hagander
Subject Re: EXEC_BACKEND + logging_collector=on is broken
Date
Msg-id CABUevEwMkwe7oCKdCy1S3+jPBKK3w=x6qFhKqXCiCugwJWwjZw@mail.gmail.com
Whole thread Raw
In response to EXEC_BACKEND + logging_collector=on is broken  (Andres Freund <andres@2ndquadrant.com>)
Responses Re: EXEC_BACKEND + logging_collector=on is broken
List pgsql-hackers
On Tue, Jan 13, 2015 at 10:23 AM, Andres Freund <andres@2ndquadrant.com> wrote:
Hi,

Currently the combination from $subject fails for me with "could not
read from backend variables file ...".

The origin for that problem seems to be b94ce6e80 which moved
RemovePgTempFiles() to after SysLogger_Start(). Unless the syslogger
starts up very quickly RemovePgTempFiles() will have deleted the server
variables file.

I think moving the RemovePgTempFiles() to just above SysLogger_Start()
should preserve the faster reporting for pg_ctl intended by b94ce6e80
and fix the startup issue?

I'm rather surprised that this hasn't caused more problems. Apparently
windows users don't use the logging_collector?

I haven't looked at the actual code. But AFAIK, logging_collector=on and storing it in pg_log is the default log behaviour for pg on Windows installed by the edb installers afaik. Always has been. Surely we didn't break logging on Windows completely back in 9.2?! Any chance it's working on Windows, just not EXEC_BACKEND on Unix?

(Dave or someone else from the EDB team can probably confirm that this is still the default in the installers?)

EXEC_BACKEND on Windows doesn't actually use a tempfile though, so I'm guessing that's it. It does an anonymous memory mapping (see top of internal_forkexec) out of the swapfile and passes a handle down. And only closes it's own handle once it's been inherited into the subprocess.

I'm pretty sure that means it's not actually broken on Windows.

--

pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: EXEC_BACKEND + logging_collector=on is broken
Next
From: Andres Freund
Date:
Subject: Re: EXEC_BACKEND + logging_collector=on is broken