~ubuntu-branches/ubuntu/natty/postgresql-8.4/natty-updates

« back to all changes in this revision

Viewing changes to src/include/storage/pmsignal.h

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2009-03-20 12:00:13 UTC
  • Revision ID: james.westby@ubuntu.com-20090320120013-hogj7egc5mjncc5g
Tags: upstream-8.4~0cvs20090328
ImportĀ upstreamĀ versionĀ 8.4~0cvs20090328

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*-------------------------------------------------------------------------
 
2
 *
 
3
 * pmsignal.h
 
4
 *        routines for signaling the postmaster from its child processes
 
5
 *
 
6
 *
 
7
 * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
 
8
 * Portions Copyright (c) 1994, Regents of the University of California
 
9
 *
 
10
 * $PostgreSQL$
 
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_RECOVERY_STARTED,      /* recovery has started */
 
26
        PMSIGNAL_RECOVERY_CONSISTENT, /* recovery has reached consistent state */
 
27
        PMSIGNAL_PASSWORD_CHANGE,       /* pg_auth file has changed */
 
28
        PMSIGNAL_WAKEN_ARCHIVER,        /* send a NOTIFY signal to xlog archiver */
 
29
        PMSIGNAL_ROTATE_LOGFILE,        /* send SIGUSR1 to syslogger to rotate logfile */
 
30
        PMSIGNAL_START_AUTOVAC_LAUNCHER,        /* start an autovacuum launcher */
 
31
        PMSIGNAL_START_AUTOVAC_WORKER,          /* start an autovacuum worker */
 
32
 
 
33
        NUM_PMSIGNALS                           /* Must be last value of enum! */
 
34
} PMSignalReason;
 
35
 
 
36
/*
 
37
 * prototypes for functions in pmsignal.c
 
38
 */
 
39
extern void PMSignalInit(void);
 
40
extern void SendPostmasterSignal(PMSignalReason reason);
 
41
extern bool CheckPostmasterSignal(PMSignalReason reason);
 
42
extern bool PostmasterIsAlive(bool amDirectChild);
 
43
 
 
44
#endif   /* PMSIGNAL_H */