20#ifdef HAVE_SYS_PRCTL_H
67#define PM_CHILD_UNUSED 0
68#define PM_CHILD_ASSIGNED 1
69#define PM_CHILD_ACTIVE 2
70#define PM_CHILD_WALSENDER 3
105#ifdef USE_POSTMASTER_DEATH_SIGNAL
123#define POSTMASTER_DEATH_SIGNAL SIGINFO
125#define POSTMASTER_DEATH_SIGNAL SIGPWR
127#error "cannot find a signal to use for postmaster death"
235 elog(
FATAL,
"postmaster child slot is already in use");
347#ifdef USE_POSTMASTER_DEATH_SIGNAL
376#ifdef USE_POSTMASTER_DEATH_SIGNAL
381 elog(
FATAL,
"read on postmaster death monitoring pipe failed: %m");
383 elog(
FATAL,
"unexpected data in postmaster death monitoring pipe");
394#ifdef USE_POSTMASTER_DEATH_SIGNAL
408#ifdef USE_POSTMASTER_DEATH_SIGNAL
415#if defined(PR_SET_PDEATHSIG)
417 elog(
ERROR,
"could not request parent death signal: %m");
418#elif defined(PROC_PDEATHSIG_CTL)
420 elog(
ERROR,
"could not request parent death signal: %m");
422#error "USE_POSTMASTER_DEATH_SIGNAL set, but there is no mechanism to request the signal"
#define Assert(condition)
#define FLEXIBLE_ARRAY_MEMBER
void on_shmem_exit(pg_on_exit_callback function, Datum arg)
int MaxLivePostmasterChildren(void)
#define PM_CHILD_WALSENDER
bool CheckPostmasterSignal(PMSignalReason reason)
static void MarkPostmasterChildInactive(int code, Datum arg)
bool PostmasterIsAliveInternal(void)
QuitSignalReason GetQuitSignalReason(void)
static void PMSignalShmemRequest(void *)
void MarkPostmasterChildSlotAssigned(int slot)
void SendPostmasterSignal(PMSignalReason reason)
void SetQuitSignalReason(QuitSignalReason reason)
static void PMSignalShmemInit(void *)
NON_EXEC_STATIC volatile PMSignalData * PMSignalState
const ShmemCallbacks PMSignalShmemCallbacks
bool MarkPostmasterChildSlotUnassigned(int slot)
void MarkPostmasterChildWalSender(void)
static int num_child_flags
bool IsPostmasterChildWalSender(int slot)
void RegisterPostmasterChildActive(void)
void PostmasterDeathSignalInit(void)
#define PM_CHILD_ASSIGNED
int postmaster_alive_fds[2]
#define POSTMASTER_FD_WATCH
Size add_size(Size s1, Size s2)
Size mul_size(Size s1, Size s2)
#define ShmemRequestStruct(...)
sig_atomic_t PMSignalFlags[NUM_PMSIGNALS]
sig_atomic_t PMChildFlags[FLEXIBLE_ARRAY_MEMBER]
QuitSignalReason sigquit_reason
ShmemRequestCallback request_fn