mirror of
https://git.postgresql.org/git/postgresql.git
synced 2026-02-17 03:47:01 +08:00
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
This commit is contained in:
@ -73,8 +73,7 @@ extern QuitSignalReason GetQuitSignalReason(void);
|
||||
extern int AssignPostmasterChildSlot(void);
|
||||
extern bool ReleasePostmasterChildSlot(int slot);
|
||||
extern bool IsPostmasterChildWalSender(int slot);
|
||||
extern void MarkPostmasterChildActive(void);
|
||||
extern void MarkPostmasterChildInactive(void);
|
||||
extern void RegisterPostmasterChildActive(void);
|
||||
extern void MarkPostmasterChildWalSender(void);
|
||||
extern bool PostmasterIsAliveInternal(void);
|
||||
extern void PostmasterDeathSignalInit(void);
|
||||
|
||||
Reference in New Issue
Block a user