pgsql: Allow parent's WaitEventSets to be freed after fork().

From: Thomas Munro <tmunro(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Allow parent's WaitEventSets to be freed after fork().
Date: 2022-12-23 07:41:16
Message-ID: E1p8cg7-0050Ji-Id@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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(at)anarazel(dot)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(+)

Browse pgsql-committers by date

  From Date Subject
Next Message David Rowley 2022-12-23 11:59:03 pgsql: Fix bug in translate_col_privs_multilevel
Previous Message Michael Paquier 2022-12-23 02:37:21 pgsql: Update upgrade_adapt.sql to handle tables using aclitem as data