1 /*-------------------------------------------------------------------------
4 * routines for signaling the postmaster from its child processes
7 * Portions Copyright (c) 1996-2011, PostgreSQL Global Development Group
8 * Portions Copyright (c) 1994, Regents of the University of California
10 * src/include/storage/pmsignal.h
12 *-------------------------------------------------------------------------
18 * Reasons for signaling the postmaster. We can cope with simultaneous
19 * signals for different reasons. If the same reason is signaled multiple
20 * times in quick succession, however, the postmaster is likely to observe
21 * only one notification of it. This is okay for the present uses.
25 PMSIGNAL_RECOVERY_STARTED, /* recovery has started */
26 PMSIGNAL_BEGIN_HOT_STANDBY, /* begin Hot Standby */
27 PMSIGNAL_WAKEN_ARCHIVER, /* send a NOTIFY signal to xlog archiver */
28 PMSIGNAL_ROTATE_LOGFILE, /* send SIGUSR1 to syslogger to rotate logfile */
29 PMSIGNAL_START_AUTOVAC_LAUNCHER, /* start an autovacuum launcher */
30 PMSIGNAL_START_AUTOVAC_WORKER, /* start an autovacuum worker */
31 PMSIGNAL_START_WALRECEIVER, /* start a walreceiver */
33 NUM_PMSIGNALS /* Must be last value of enum! */
36 /* PMSignalData is an opaque struct, details known only within pmsignal.c */
37 typedef struct PMSignalData PMSignalData;
40 * prototypes for functions in pmsignal.c
42 extern Size PMSignalShmemSize(void);
43 extern void PMSignalShmemInit(void);
44 extern void SendPostmasterSignal(PMSignalReason reason);
45 extern bool CheckPostmasterSignal(PMSignalReason reason);
46 extern int AssignPostmasterChildSlot(void);
47 extern bool ReleasePostmasterChildSlot(int slot);
48 extern bool IsPostmasterChildWalSender(int slot);
49 extern void MarkPostmasterChildActive(void);
50 extern void MarkPostmasterChildInactive(void);
51 extern bool PostmasterIsAlive(bool amDirectChild);
53 #endif /* PMSIGNAL_H */