PostgreSQL Source Code
git master
|
#include <signal.h>
Go to the source code of this file.
Macros | |
#define | NUM_PMSIGNALS (PMSIGNAL_ADVANCE_STATE_MACHINE+1) |
#define | PostmasterIsAlive() PostmasterIsAliveInternal() |
Typedefs | |
typedef struct PMSignalData | PMSignalData |
Functions | |
Size | PMSignalShmemSize (void) |
void | PMSignalShmemInit (void) |
void | SendPostmasterSignal (PMSignalReason reason) |
bool | CheckPostmasterSignal (PMSignalReason reason) |
void | SetQuitSignalReason (QuitSignalReason reason) |
QuitSignalReason | GetQuitSignalReason (void) |
void | MarkPostmasterChildSlotAssigned (int slot) |
bool | MarkPostmasterChildSlotUnassigned (int slot) |
bool | IsPostmasterChildWalSender (int slot) |
void | RegisterPostmasterChildActive (void) |
void | MarkPostmasterChildWalSender (void) |
bool | PostmasterIsAliveInternal (void) |
void | PostmasterDeathSignalInit (void) |
#define NUM_PMSIGNALS (PMSIGNAL_ADVANCE_STATE_MACHINE+1) |
Definition at line 45 of file pmsignal.h.
#define PostmasterIsAlive | ( | ) | PostmasterIsAliveInternal() |
Definition at line 105 of file pmsignal.h.
typedef struct PMSignalData PMSignalData |
Definition at line 1 of file pmsignal.h.
enum PMSignalReason |
Definition at line 33 of file pmsignal.h.
enum QuitSignalReason |
Enumerator | |
---|---|
PMQUIT_NOT_SENT | |
PMQUIT_FOR_CRASH | |
PMQUIT_FOR_STOP |
Definition at line 50 of file pmsignal.h.
bool CheckPostmasterSignal | ( | PMSignalReason | reason | ) |
Definition at line 182 of file pmsignal.c.
References PMSignalData::PMSignalFlags, and PMSignalState.
Referenced by process_pm_pmsignal().
QuitSignalReason GetQuitSignalReason | ( | void | ) |
Definition at line 213 of file pmsignal.c.
References IsUnderPostmaster, PMQUIT_NOT_SENT, PMSignalState, and PMSignalData::sigquit_reason.
Referenced by quickdie().
bool IsPostmasterChildWalSender | ( | int | slot | ) |
Definition at line 271 of file pmsignal.c.
References Assert, num_child_flags, PM_CHILD_WALSENDER, PMSignalData::PMChildFlags, and PMSignalState.
Referenced by CountChildren(), and SignalChildren().
void MarkPostmasterChildSlotAssigned | ( | int | slot | ) |
Definition at line 230 of file pmsignal.c.
References Assert, elog, FATAL, num_child_flags, PM_CHILD_ASSIGNED, PM_CHILD_UNUSED, PMSignalData::PMChildFlags, and PMSignalState.
Referenced by AssignPostmasterChildSlot().
bool MarkPostmasterChildSlotUnassigned | ( | int | slot | ) |
Definition at line 249 of file pmsignal.c.
References Assert, num_child_flags, PM_CHILD_ASSIGNED, PM_CHILD_UNUSED, PMSignalData::PMChildFlags, and PMSignalState.
Referenced by ReleasePostmasterChildSlot().
void MarkPostmasterChildWalSender | ( | void | ) |
Definition at line 309 of file pmsignal.c.
References am_walsender, Assert, MyPMChildSlot, num_child_flags, PM_CHILD_ACTIVE, PM_CHILD_WALSENDER, PMSignalData::PMChildFlags, and PMSignalState.
void PMSignalShmemInit | ( | void | ) |
Definition at line 145 of file pmsignal.c.
References MaxLivePostmasterChildren(), MemSet, PMSignalData::num_child_flags, num_child_flags, PMSignalShmemSize(), PMSignalState, ShmemInitStruct(), and unvolatize.
Referenced by CreateOrAttachShmemStructs().
Size PMSignalShmemSize | ( | void | ) |
Definition at line 130 of file pmsignal.c.
References add_size(), MaxLivePostmasterChildren(), mul_size(), and size.
Referenced by CalculateShmemSize(), and PMSignalShmemInit().
void PostmasterDeathSignalInit | ( | void | ) |
Definition at line 407 of file pmsignal.c.
References elog, ERROR, and pqsignal().
Referenced by InitPostmasterChild().
bool PostmasterIsAliveInternal | ( | void | ) |
Definition at line 346 of file pmsignal.c.
References EAGAIN, elog, EWOULDBLOCK, FATAL, postmaster_alive_fds, POSTMASTER_FD_WATCH, and read.
Referenced by WaitEventSetWaitBlock().
void RegisterPostmasterChildActive | ( | void | ) |
Definition at line 290 of file pmsignal.c.
References Assert, MarkPostmasterChildInactive(), MyPMChildSlot, num_child_flags, on_shmem_exit(), PM_CHILD_ACTIVE, PM_CHILD_ASSIGNED, PMSignalData::PMChildFlags, and PMSignalState.
Referenced by InitAuxiliaryProcess(), and InitProcess().
void SendPostmasterSignal | ( | PMSignalReason | reason | ) |
Definition at line 165 of file pmsignal.c.
References IsUnderPostmaster, kill, PMSignalData::PMSignalFlags, PMSignalState, PostmasterPid, and SIGUSR1.
Referenced by CheckRecoveryConsistency(), do_start_worker(), GetNewMultiXactId(), GetNewTransactionId(), PerformWalRecovery(), pg_rotate_logfile(), RegisterDynamicBackgroundWorker(), RequestXLogStreaming(), SetMultiXactIdLimit(), SetTransactionIdLimit(), and TerminateBackgroundWorker().
void SetQuitSignalReason | ( | QuitSignalReason | reason | ) |
Definition at line 202 of file pmsignal.c.
References PMSignalState, and PMSignalData::sigquit_reason.
Referenced by HandleChildCrash(), and process_pm_shutdown_request().