pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heikki Linnakangas <heikki.linnakangas@iki.fi>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Use an shmem_exit callback to remove backend from PMChildFlags o
Date: Tue, 08 Oct 2024 12:16:43 +0000
Message-ID: <E1sy98t-002i3B-1Q@gemulon.postgresql.org> (raw)

Use an shmem_exit callback to remove backend from PMChildFlags on exit

This seems nicer than having to duplicate the logic between
InitProcess() and ProcKill() for which child processes have a
PMChildFlags slot.

Move the MarkPostmasterChildActive() call earlier in InitProcess(),
out of the section protected by the spinlock.

Reviewed-by: Andres Freund <andres@anarazel.de>
Discussion: https://www.postgresql.org/message-id/a102f15f-eac4-4ff2-af02-f9ff209ec66f@iki.fi

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/2bbc261ddbdfee2def5d14ee9fcc09c70bdf84e6

Modified Files
--------------
src/backend/storage/ipc/pmsignal.c | 17 +++++++++++++----
src/backend/storage/lmgr/proc.c    | 38 +++++++++++++-------------------------
src/include/storage/pmsignal.h     |  3 +--
3 files changed, 27 insertions(+), 31 deletions(-)



Message-ID: <E1sy98t-002i3B-1Q@gemulon.postgresql.org>
Permalink:  ../E1sy98t-002i3B-1Q@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1sy98t-002i3B-1Q@gemulon.postgresql.org

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: heikki.linnakangas@iki.fi, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Use an shmem_exit callback to remove backend from PMChildFlags o
  In-Reply-To: <E1sy98t-002i3B-1Q@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