PostgreSQL Source Code
git master
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
a
c
d
g
h
i
k
l
m
p
r
s
t
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
c
d
f
h
i
n
o
p
r
s
t
~
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
lwlocklist.h
Go to the documentation of this file.
1
/*-------------------------------------------------------------------------
2
*
3
* lwlocklist.h
4
*
5
* The list of predefined LWLocks and built-in LWLock tranches is kept in
6
* its own source file for use by automatic tools. The exact
7
* representation of a keyword is determined by the PG_LWLOCK and
8
* PG_LWLOCKTRANCHE macros, which are not defined in this file; they can be
9
* defined by the caller for special purposes.
10
*
11
* Also, generate-lwlocknames.pl processes this file to create lwlocknames.h.
12
*
13
* Portions Copyright (c) 1996-2025, PostgreSQL Global Development Group
14
* Portions Copyright (c) 1994, Regents of the University of California
15
*
16
* IDENTIFICATION
17
* src/include/storage/lwlocklist.h
18
*
19
*-------------------------------------------------------------------------
20
*/
21
22
/*
23
* Some commonly-used locks have predefined positions within MainLWLockArray;
24
* these are defined here. If you add a lock, add it to the end to avoid
25
* renumbering the existing locks; if you remove a lock, consider leaving a gap
26
* in the numbering sequence for the benefit of DTrace and other external
27
* debugging scripts. Also, do not forget to update the section
28
* WaitEventLWLock of src/backend/utils/activity/wait_event_names.txt.
29
*
30
* Note that the names here don't include the Lock suffix, to appease the
31
* C preprocessor; it's added elsewhere.
32
*/
33
34
/* 0 is available; was formerly BufFreelistLock */
35
PG_LWLOCK
(1,
ShmemIndex
)
36
PG_LWLOCK
(2, OidGen)
37
PG_LWLOCK
(3, XidGen)
38
PG_LWLOCK
(4, ProcArray)
39
PG_LWLOCK
(5, SInvalRead)
40
PG_LWLOCK
(6, SInvalWrite)
41
PG_LWLOCK
(7, WALBufMapping)
42
PG_LWLOCK
(8, WALWrite)
43
PG_LWLOCK
(9,
ControlFile
)
44
/* 10 was CheckpointLock */
45
/* 11 was XactSLRULock */
46
/* 12 was SubtransSLRULock */
47
PG_LWLOCK
(13, MultiXactGen)
48
/* 14 was MultiXactOffsetSLRULock */
49
/* 15 was MultiXactMemberSLRULock */
50
PG_LWLOCK
(16, RelCacheInit)
51
PG_LWLOCK
(17, CheckpointerComm)
52
PG_LWLOCK
(18,
TwoPhaseState
)
53
PG_LWLOCK
(19, TablespaceCreate)
54
PG_LWLOCK
(20, BtreeVacuum)
55
PG_LWLOCK
(21, AddinShmemInit)
56
PG_LWLOCK
(22, Autovacuum)
57
PG_LWLOCK
(23, AutovacuumSchedule)
58
PG_LWLOCK
(24, SyncScan)
59
PG_LWLOCK
(25, RelationMapping)
60
/* 26 was NotifySLRULock */
61
PG_LWLOCK
(27, NotifyQueue)
62
PG_LWLOCK
(28, SerializableXactHash)
63
PG_LWLOCK
(29, SerializableFinishedList)
64
PG_LWLOCK
(30, SerializablePredicateList)
65
/* 31 was SerialSLRULock */
66
PG_LWLOCK
(32, SyncRep)
67
PG_LWLOCK
(33,
BackgroundWorker
)
68
PG_LWLOCK
(34, DynamicSharedMemoryControl)
69
PG_LWLOCK
(35, AutoFile)
70
PG_LWLOCK
(36, ReplicationSlotAllocation)
71
PG_LWLOCK
(37, ReplicationSlotControl)
72
/* 38 was CommitTsSLRULock */
73
PG_LWLOCK
(39, CommitTs)
74
PG_LWLOCK
(40, ReplicationOrigin)
75
PG_LWLOCK
(41, MultiXactTruncation)
76
/* 42 was OldSnapshotTimeMapLock */
77
PG_LWLOCK
(43,
LogicalRepWorker
)
78
PG_LWLOCK
(44, XactTruncation)
79
/* 45 was XactTruncationLock until removal of BackendRandomLock */
80
PG_LWLOCK
(46, WrapLimitsVacuum)
81
PG_LWLOCK
(47, NotifyQueueTail)
82
PG_LWLOCK
(48, WaitEventCustom)
83
PG_LWLOCK
(49, WALSummarizer)
84
PG_LWLOCK
(50, DSMRegistry)
85
PG_LWLOCK
(51, InjectionPoint)
86
PG_LWLOCK
(52,
SerialControl
)
87
PG_LWLOCK
(53, AioWorkerSubmissionQueue)
88
PG_LWLOCK
(54, WaitLSN)
89
90
/*
91
* There also exist several built-in LWLock tranches. As with the predefined
92
* LWLocks, be sure to update the WaitEventLWLock section of
93
* src/backend/utils/activity/wait_event_names.txt when modifying this list.
94
*
95
* Note that the IDs here (the first value) don't include the LWTRANCHE_
96
* prefix. It's added elsewhere.
97
*/
98
PG_LWLOCKTRANCHE
(XACT_BUFFER, XactBuffer)
99
PG_LWLOCKTRANCHE
(COMMITTS_BUFFER, CommitTsBuffer)
100
PG_LWLOCKTRANCHE
(SUBTRANS_BUFFER, SubtransBuffer)
101
PG_LWLOCKTRANCHE
(MULTIXACTOFFSET_BUFFER, MultiXactOffsetBuffer)
102
PG_LWLOCKTRANCHE
(MULTIXACTMEMBER_BUFFER, MultiXactMemberBuffer)
103
PG_LWLOCKTRANCHE
(NOTIFY_BUFFER, NotifyBuffer)
104
PG_LWLOCKTRANCHE
(SERIAL_BUFFER, SerialBuffer)
105
PG_LWLOCKTRANCHE
(WAL_INSERT, WALInsert)
106
PG_LWLOCKTRANCHE
(BUFFER_CONTENT, BufferContent)
107
PG_LWLOCKTRANCHE
(REPLICATION_ORIGIN_STATE, ReplicationOriginState)
108
PG_LWLOCKTRANCHE
(REPLICATION_SLOT_IO, ReplicationSlotIO)
109
PG_LWLOCKTRANCHE
(LOCK_FASTPATH, LockFastPath)
110
PG_LWLOCKTRANCHE
(BUFFER_MAPPING, BufferMapping)
111
PG_LWLOCKTRANCHE
(LOCK_MANAGER, LockManager)
112
PG_LWLOCKTRANCHE
(PREDICATE_LOCK_MANAGER, PredicateLockManager)
113
PG_LWLOCKTRANCHE
(PARALLEL_HASH_JOIN, ParallelHashJoin)
114
PG_LWLOCKTRANCHE
(PARALLEL_BTREE_SCAN, ParallelBtreeScan)
115
PG_LWLOCKTRANCHE
(PARALLEL_QUERY_DSA, ParallelQueryDSA)
116
PG_LWLOCKTRANCHE
(PER_SESSION_DSA, PerSessionDSA)
117
PG_LWLOCKTRANCHE
(PER_SESSION_RECORD_TYPE, PerSessionRecordType)
118
PG_LWLOCKTRANCHE
(PER_SESSION_RECORD_TYPMOD, PerSessionRecordTypmod)
119
PG_LWLOCKTRANCHE
(SHARED_TUPLESTORE, SharedTupleStore)
120
PG_LWLOCKTRANCHE
(SHARED_TIDBITMAP, SharedTidBitmap)
121
PG_LWLOCKTRANCHE
(PARALLEL_APPEND, ParallelAppend)
122
PG_LWLOCKTRANCHE
(PER_XACT_PREDICATE_LIST, PerXactPredicateList)
123
PG_LWLOCKTRANCHE
(PGSTATS_DSA, PgStatsDSA)
124
PG_LWLOCKTRANCHE
(PGSTATS_HASH, PgStatsHash)
125
PG_LWLOCKTRANCHE
(PGSTATS_DATA, PgStatsData)
126
PG_LWLOCKTRANCHE
(LAUNCHER_DSA, LogicalRepLauncherDSA)
127
PG_LWLOCKTRANCHE
(LAUNCHER_HASH, LogicalRepLauncherHash)
128
PG_LWLOCKTRANCHE
(DSM_REGISTRY_DSA, DSMRegistryDSA)
129
PG_LWLOCKTRANCHE
(DSM_REGISTRY_HASH, DSMRegistryHash)
130
PG_LWLOCKTRANCHE
(COMMITTS_SLRU, CommitTsSLRU)
131
PG_LWLOCKTRANCHE
(MULTIXACTOFFSET_SLRU, MultiXactOffsetSLRU)
132
PG_LWLOCKTRANCHE
(MULTIXACTMEMBER_SLRU, MultiXactMemberSLRU)
133
PG_LWLOCKTRANCHE
(NOTIFY_SLRU, NotifySLRU)
134
PG_LWLOCKTRANCHE
(SERIAL_SLRU, SerialSLRU)
135
PG_LWLOCKTRANCHE
(SUBTRANS_SLRU, SubtransSLRU)
136
PG_LWLOCKTRANCHE
(XACT_SLRU, XactSLRU)
137
PG_LWLOCKTRANCHE
(PARALLEL_VACUUM_DSA, ParallelVacuumDSA)
138
PG_LWLOCKTRANCHE
(AIO_URING_COMPLETION, AioUringCompletion)
PG_LWLOCK
#define PG_LWLOCK(id, lockname)
PG_LWLOCKTRANCHE
#define PG_LWLOCKTRANCHE(id, lockname)
ShmemIndex
static HTAB * ShmemIndex
Definition:
shmem.c:92
BackgroundWorker
Definition:
bgworker.h:90
LogicalRepWorker
Definition:
worker_internal.h:39
SerialControlData
Definition:
predicate.c:346
TwoPhaseState
static TwoPhaseStateData * TwoPhaseState
Definition:
twophase.c:189
ControlFile
static ControlFileData * ControlFile
Definition:
xlog.c:575
src
include
storage
lwlocklist.h
Generated on Thu Nov 13 2025 18:13:17 for PostgreSQL Source Code by
1.9.4