PostgreSQL Source Code
git master
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
Functions
Variables
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
Data Fields
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
f
h
i
n
o
p
r
s
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
Files
File List
Globals
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
•
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
pidfile.h
Go to the documentation of this file.
1
/*-------------------------------------------------------------------------
2
*
3
* pidfile.h
4
* Declarations describing the data directory lock file (postmaster.pid)
5
*
6
* Portions Copyright (c) 1996-2025, PostgreSQL Global Development Group
7
* Portions Copyright (c) 1994, Regents of the University of California
8
*
9
* src/include/utils/pidfile.h
10
*
11
*-------------------------------------------------------------------------
12
*/
13
#ifndef UTILS_PIDFILE_H
14
#define UTILS_PIDFILE_H
15
16
/*
17
* As of Postgres 10, the contents of the data-directory lock file are:
18
*
19
* line #
20
* 1 postmaster PID (or negative of a standalone backend's PID)
21
* 2 data directory path
22
* 3 postmaster start timestamp (time_t representation)
23
* 4 port number
24
* 5 first Unix socket directory path (empty if none)
25
* 6 first listen_address (IP address or "*"; empty if no TCP port)
26
* 7 shared memory key (empty on Windows)
27
* 8 postmaster status (see values below)
28
*
29
* Lines 6 and up are added via AddToDataDirLockFile() after initial file
30
* creation; also, line 5 is initially empty and is changed after the first
31
* Unix socket is opened. Onlookers should not assume that lines 4 and up
32
* are filled in any particular order.
33
*
34
* Socket lock file(s), if used, have the same contents as lines 1-5, with
35
* line 5 being their own directory.
36
*/
37
#define LOCK_FILE_LINE_PID 1
38
#define LOCK_FILE_LINE_DATA_DIR 2
39
#define LOCK_FILE_LINE_START_TIME 3
40
#define LOCK_FILE_LINE_PORT 4
41
#define LOCK_FILE_LINE_SOCKET_DIR 5
42
#define LOCK_FILE_LINE_LISTEN_ADDR 6
43
#define LOCK_FILE_LINE_SHMEM_KEY 7
44
#define LOCK_FILE_LINE_PM_STATUS 8
45
46
/*
47
* The PM_STATUS line may contain one of these values. All these strings
48
* must be the same length, per comments for AddToDataDirLockFile().
49
* We pad with spaces as needed to make that true.
50
*/
51
#define PM_STATUS_STARTING "starting"
/* still starting up */
52
#define PM_STATUS_STOPPING "stopping"
/* in shutdown sequence */
53
#define PM_STATUS_READY "ready "
/* ready for connections */
54
#define PM_STATUS_STANDBY "standby "
/* up, won't accept connections */
55
56
#endif
/* UTILS_PIDFILE_H */
src
include
utils
pidfile.h
Generated on Tue Jan 21 2025 06:13:27 for PostgreSQL Source Code by
1.9.4