pgsql: Use an shmem_exit callback to remove backend from PMChildFlags o - Mailing list pgsql-committers

From Heikki Linnakangas
Subject pgsql: Use an shmem_exit callback to remove backend from PMChildFlags o
Date
Msg-id E1sy98t-002i3B-1Q@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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(-)


pgsql-committers by date:

Previous
From: Tatsuo Ishii
Date:
Subject: pgsql: Doc: add check to detect non-breaking spaces in the docs.
Next
From: Heikki Linnakangas
Date:
Subject: pgsql: Fix typo and run pgperltidy on newly-added test