Re: Use FD_CLOEXEC on ListenSockets (was Re: Refactoring backend fork+exec code)

From: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Tristan Partin <tristan(at)neon(dot)tech>, Peter Geoghegan <pg(at)bowt(dot)ie>
Subject: Re: Use FD_CLOEXEC on ListenSockets (was Re: Refactoring backend fork+exec code)
Date: 2023-08-29 06:58:48
Message-ID: 7bb7ad65-a018-2419-742f-fa5fd877d338@iki.fi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 29/08/2023 09:21, Heikki Linnakangas wrote:
> Thinking about this some more, the ListenSockets array is a bit silly
> anyway. We fill the array starting from index 0, always append to the
> end, and never remove entries from it. It would seem more
> straightforward to keep track of the used size of the array. Currently
> we always loop through the unused parts too, and e.g.
> ConfigurePostmasterWaitSet() needs to walk the array to count how many
> elements are in use.

Like this.

--
Heikki Linnakangas
Neon (https://neon.tech)

Attachment Content-Type Size
0001-Refactor-ListenSocket-array.patch text/x-patch 8.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeevan Chalke 2023-08-29 07:05:07 More new SQL/JSON item methods
Previous Message Thomas Munro 2023-08-29 06:41:59 Re: Query execution in Perl TAP tests needs work