PostgreSQL Source Code
git master
Loading...
Searching...
No Matches
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-2026, 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
PG_LWLOCK
(55,
LogicalDecodingControl
)
90
91
/*
92
* There also exist several built-in LWLock tranches. As with the predefined
93
* LWLocks, be sure to update the WaitEventLWLock section of
94
* src/backend/utils/activity/wait_event_names.txt when modifying this list.
95
*
96
* Note that the IDs here (the first value) don't include the LWTRANCHE_
97
* prefix. It's added elsewhere.
98
*/
99
PG_LWLOCKTRANCHE
(
XACT_BUFFER
,
XactBuffer
)
100
PG_LWLOCKTRANCHE
(
COMMITTS_BUFFER
,
CommitTsBuffer
)
101
PG_LWLOCKTRANCHE
(
SUBTRANS_BUFFER
,
SubtransBuffer
)
102
PG_LWLOCKTRANCHE
(
MULTIXACTOFFSET_BUFFER
,
MultiXactOffsetBuffer
)
103
PG_LWLOCKTRANCHE
(
MULTIXACTMEMBER_BUFFER
,
MultiXactMemberBuffer
)
104
PG_LWLOCKTRANCHE
(
NOTIFY_BUFFER
,
NotifyBuffer
)
105
PG_LWLOCKTRANCHE
(
NOTIFY_CHANNEL_HASH
,
NotifyChannelHash
)
106
PG_LWLOCKTRANCHE
(
SERIAL_BUFFER
,
SerialBuffer
)
107
PG_LWLOCKTRANCHE
(
WAL_INSERT
,
WALInsert
)
108
PG_LWLOCKTRANCHE
(
REPLICATION_ORIGIN_STATE
,
ReplicationOriginState
)
109
PG_LWLOCKTRANCHE
(
REPLICATION_SLOT_IO
,
ReplicationSlotIO
)
110
PG_LWLOCKTRANCHE
(
LOCK_FASTPATH
,
LockFastPath
)
111
PG_LWLOCKTRANCHE
(
BUFFER_MAPPING
,
BufferMapping
)
112
PG_LWLOCKTRANCHE
(
LOCK_MANAGER
,
LockManager
)
113
PG_LWLOCKTRANCHE
(
PREDICATE_LOCK_MANAGER
,
PredicateLockManager
)
114
PG_LWLOCKTRANCHE
(
PARALLEL_HASH_JOIN
,
ParallelHashJoin
)
115
PG_LWLOCKTRANCHE
(
PARALLEL_BTREE_SCAN
,
ParallelBtreeScan
)
116
PG_LWLOCKTRANCHE
(
PARALLEL_QUERY_DSA
,
ParallelQueryDSA
)
117
PG_LWLOCKTRANCHE
(
PER_SESSION_DSA
,
PerSessionDSA
)
118
PG_LWLOCKTRANCHE
(
PER_SESSION_RECORD_TYPE
,
PerSessionRecordType
)
119
PG_LWLOCKTRANCHE
(
PER_SESSION_RECORD_TYPMOD
,
PerSessionRecordTypmod
)
120
PG_LWLOCKTRANCHE
(
SHARED_TUPLESTORE
,
SharedTupleStore
)
121
PG_LWLOCKTRANCHE
(
SHARED_TIDBITMAP
,
SharedTidBitmap
)
122
PG_LWLOCKTRANCHE
(
PARALLEL_APPEND
,
ParallelAppend
)
123
PG_LWLOCKTRANCHE
(
PER_XACT_PREDICATE_LIST
,
PerXactPredicateList
)
124
PG_LWLOCKTRANCHE
(
PGSTATS_DSA
,
PgStatsDSA
)
125
PG_LWLOCKTRANCHE
(
PGSTATS_HASH
,
PgStatsHash
)
126
PG_LWLOCKTRANCHE
(
PGSTATS_DATA
,
PgStatsData
)
127
PG_LWLOCKTRANCHE
(
LAUNCHER_DSA
,
LogicalRepLauncherDSA
)
128
PG_LWLOCKTRANCHE
(
LAUNCHER_HASH
,
LogicalRepLauncherHash
)
129
PG_LWLOCKTRANCHE
(
DSM_REGISTRY_DSA
,
DSMRegistryDSA
)
130
PG_LWLOCKTRANCHE
(
DSM_REGISTRY_HASH
,
DSMRegistryHash
)
131
PG_LWLOCKTRANCHE
(
COMMITTS_SLRU
,
CommitTsSLRU
)
132
PG_LWLOCKTRANCHE
(
MULTIXACTOFFSET_SLRU
,
MultiXactOffsetSLRU
)
133
PG_LWLOCKTRANCHE
(
MULTIXACTMEMBER_SLRU
,
MultiXactMemberSLRU
)
134
PG_LWLOCKTRANCHE
(
NOTIFY_SLRU
,
NotifySLRU
)
135
PG_LWLOCKTRANCHE
(
SERIAL_SLRU
,
SerialSLRU
)
136
PG_LWLOCKTRANCHE
(
SUBTRANS_SLRU
,
SubtransSLRU
)
137
PG_LWLOCKTRANCHE
(
XACT_SLRU
,
XactSLRU
)
138
PG_LWLOCKTRANCHE
(
PARALLEL_VACUUM_DSA
,
ParallelVacuumDSA
)
139
PG_LWLOCKTRANCHE
(
AIO_URING_COMPLETION
,
AioUringCompletion
)
PG_LWLOCK
#define PG_LWLOCK(id, lockname)
PG_LWLOCKTRANCHE
#define PG_LWLOCKTRANCHE(id, lockname)
fb
static int fb(int x)
Definition
preproc-init.c:92
ShmemIndex
static HTAB * ShmemIndex
Definition
shmem.c:93
BackgroundWorker
Definition
bgworker.h:97
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:576
src
include
storage
lwlocklist.h
Generated on Tue Jan 27 2026 06:13:17 for PostgreSQL Source Code by
1.9.8