From: Thomas Munro <tmunro@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Allow parent's WaitEventSets to be freed after fork().
Date: Fri, 23 Dec 2022 07:41:16 +0000
Message-ID: <E1p8cg7-0050Ji-Id@gemulon.postgresql.org> (raw)
Allow parent's WaitEventSets to be freed after fork().
An epoll fd belonging to the parent should be closed in the child. A
kqueue fd is automatically closed by fork(), but we should still adjust
our counter. For poll and Windows systems, nothing special is required.
On all systems we free the memory.
No caller yet, but we'll need this if we start using WaitEventSet in the
postmaster as planned.
Reviewed-by: Andres Freund <andres@anarazel.de>
Discussion: https://postgr.es/m/CA%2BhUKG%2BZ-HpOj1JsO9eWUP%2Bar7npSVinsC_npxSy%2BjdOMsx%3DGg%40mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/b5d0f8ec01c021452203b2fd3921c9b55f6c3cd3
Modified Files
--------------
src/backend/storage/ipc/latch.c | 17 +++++++++++++++++
src/include/storage/latch.h | 1 +
2 files changed, 18 insertions(+)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: tmunro@postgresql.org
Subject: Re: pgsql: Allow parent's WaitEventSets to be freed after fork().
In-Reply-To: <E1p8cg7-0050Ji-Id@gemulon.postgresql.org>
References: <E1p8cg7-0050Ji-Id@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox