Re: Use FD_CLOEXEC on ListenSockets (was Re: Refactoring backend fork+exec code) - Mailing list pgsql-hackers

From Jeff Janes
Subject Re: Use FD_CLOEXEC on ListenSockets (was Re: Refactoring backend fork+exec code)
Date
Msg-id CAMkU=1ysxRSGtJMzMj1MYT6h+TsXFMv6PhD_ZDgPazVAYQyMiw@mail.gmail.com
Whole thread Raw
In response to Re: Use FD_CLOEXEC on ListenSockets (was Re: Refactoring backend fork+exec code)  (Heikki Linnakangas <hlinnaka@iki.fi>)
Responses Re: Use FD_CLOEXEC on ListenSockets (was Re: Refactoring backend fork+exec code)
List pgsql-hackers
On Thu, Aug 24, 2023 at 10:05 AM Heikki Linnakangas <hlinnaka@iki.fi> wrote:
On 24/08/2023 15:48, Thomas Munro wrote:
> LGTM.  I vaguely recall thinking that it might be better to keep
> EXEC_BACKEND and !EXEC_BACKEND working the same which might be why I
> didn't try this one, but it looks fine with the comment to explain, as
> you have it.  (It's a shame we can't use O_CLOFORK.)

Yeah, O_CLOFORK would be nice..

Committed, thanks!


Since this commit, I'm getting a lot (63 per restart) of messages:

 LOG:  could not close client or listen socket: Bad file descriptor
 
All I have to do to get the message is turn logging_collector = on and restart.

The close failure condition existed before the commit, it just wasn't logged before.  So, did the extra logging added here just uncover a  pre-existing bug?

The LOG message is sent to the terminal, not to the log file.

Cheers,

Jeff

pgsql-hackers by date:

Previous
From: Matthias van de Meent
Date:
Subject: Re: Disabling Heap-Only Tuples
Next
From: Robert Haas
Date:
Subject: Re: Disabling Heap-Only Tuples