]> granicus.if.org Git - postgresql/blob - src/include/storage/pmsignal.h
3bd3268edde54c8518e787d59df126b13895969c
[postgresql] / src / include / storage / pmsignal.h
1 /*-------------------------------------------------------------------------
2  *
3  * pmsignal.h
4  *        routines for signaling the postmaster from its child processes
5  *
6  *
7  * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
8  * Portions Copyright (c) 1994, Regents of the University of California
9  *
10  * $PostgreSQL: pgsql/src/include/storage/pmsignal.h,v 1.13 2005/08/12 03:24:43 momjian Exp $
11  *
12  *-------------------------------------------------------------------------
13  */
14 #ifndef PMSIGNAL_H
15 #define PMSIGNAL_H
16
17 /*
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.
22  */
23 typedef enum
24 {
25         PMSIGNAL_PASSWORD_CHANGE,       /* pg_auth file has changed */
26         PMSIGNAL_WAKEN_CHILDREN,        /* send a SIGUSR1 signal to all backends */
27         PMSIGNAL_WAKEN_ARCHIVER,        /* send a NOTIFY signal to xlog archiver */
28         PMSIGNAL_ROTATE_LOGFILE,        /* send SIGUSR1 to syslogger to rotate logfile */
29
30         NUM_PMSIGNALS                           /* Must be last value of enum! */
31 } PMSignalReason;
32
33 /*
34  * prototypes for functions in pmsignal.c
35  */
36 extern void PMSignalInit(void);
37 extern void SendPostmasterSignal(PMSignalReason reason);
38 extern bool CheckPostmasterSignal(PMSignalReason reason);
39 extern bool PostmasterIsAlive(bool amDirectChild);
40
41 #endif   /* PMSIGNAL_H */