PostgreSQL Source Code
git master
Main Page
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
procsignal.h
Go to the documentation of this file.
1
/*-------------------------------------------------------------------------
2
*
3
* procsignal.h
4
* Routines for interprocess signalling
5
*
6
*
7
* Portions Copyright (c) 1996-2016, PostgreSQL Global Development Group
8
* Portions Copyright (c) 1994, Regents of the University of California
9
*
10
* src/include/storage/procsignal.h
11
*
12
*-------------------------------------------------------------------------
13
*/
14
#ifndef PROCSIGNAL_H
15
#define PROCSIGNAL_H
16
17
#include "
storage/backendid.h
"
18
19
20
/*
21
* Reasons for signalling a Postgres child process (a backend or an auxiliary
22
* process, like checkpointer). We can cope with concurrent signals for different
23
* reasons. However, if the same reason is signaled multiple times in quick
24
* succession, the process is likely to observe only one notification of it.
25
* This is okay for the present uses.
26
*
27
* Also, because of race conditions, it's important that all the signals be
28
* defined so that no harm is done if a process mistakenly receives one.
29
*/
30
typedef
enum
31
{
32
PROCSIG_CATCHUP_INTERRUPT
,
/* sinval catchup interrupt */
33
PROCSIG_NOTIFY_INTERRUPT
,
/* listen/notify interrupt */
34
PROCSIG_PARALLEL_MESSAGE
,
/* message from cooperating parallel backend */
35
36
/* Recovery conflict reasons */
37
PROCSIG_RECOVERY_CONFLICT_DATABASE
,
38
PROCSIG_RECOVERY_CONFLICT_TABLESPACE
,
39
PROCSIG_RECOVERY_CONFLICT_LOCK
,
40
PROCSIG_RECOVERY_CONFLICT_SNAPSHOT
,
41
PROCSIG_RECOVERY_CONFLICT_BUFFERPIN
,
42
PROCSIG_RECOVERY_CONFLICT_STARTUP_DEADLOCK
,
43
44
NUM_PROCSIGNALS
/* Must be last! */
45
}
ProcSignalReason
;
46
47
/*
48
* prototypes for functions in procsignal.c
49
*/
50
extern
Size
ProcSignalShmemSize
(
void
);
51
extern
void
ProcSignalShmemInit
(
void
);
52
53
extern
void
ProcSignalInit
(
int
pss_idx);
54
extern
int
SendProcSignal
(pid_t pid,
ProcSignalReason
reason,
55
BackendId
backendId);
56
57
extern
void
procsignal_sigusr1_handler
(
SIGNAL_ARGS
);
58
59
#endif
/* PROCSIGNAL_H */
ProcSignalInit
void ProcSignalInit(int pss_idx)
Definition:
procsignal.c:104
ProcSignalShmemInit
void ProcSignalShmemInit(void)
Definition:
procsignal.c:83
PROCSIG_NOTIFY_INTERRUPT
Definition:
procsignal.h:33
ProcSignalShmemSize
Size ProcSignalShmemSize(void)
Definition:
procsignal.c:73
PROCSIG_PARALLEL_MESSAGE
Definition:
procsignal.h:34
PROCSIG_RECOVERY_CONFLICT_TABLESPACE
Definition:
procsignal.h:38
PROCSIG_RECOVERY_CONFLICT_DATABASE
Definition:
procsignal.h:37
PROCSIG_RECOVERY_CONFLICT_LOCK
Definition:
procsignal.h:39
BackendId
int BackendId
Definition:
backendid.h:21
procsignal_sigusr1_handler
void procsignal_sigusr1_handler(SIGNAL_ARGS)
Definition:
procsignal.c:260
PROCSIG_RECOVERY_CONFLICT_BUFFERPIN
Definition:
procsignal.h:41
NUM_PROCSIGNALS
Definition:
procsignal.h:44
SIGNAL_ARGS
#define SIGNAL_ARGS
Definition:
c.h:1059
backendid.h
Size
size_t Size
Definition:
c.h:352
PROCSIG_CATCHUP_INTERRUPT
Definition:
procsignal.h:32
ProcSignalReason
ProcSignalReason
Definition:
procsignal.h:30
SendProcSignal
int SendProcSignal(pid_t pid, ProcSignalReason reason, BackendId backendId)
Definition:
procsignal.c:179
PROCSIG_RECOVERY_CONFLICT_STARTUP_DEADLOCK
Definition:
procsignal.h:42
PROCSIG_RECOVERY_CONFLICT_SNAPSHOT
Definition:
procsignal.h:40
src
include
storage
procsignal.h
Generated on Sat Apr 30 2016 05:15:39 for PostgreSQL Source Code by
1.8.8