PostgreSQL Source Code git master
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 predefined LWLock list is kept in its own source file for use by
6 * automatic tools. The exact representation of a keyword is determined by
7 * the PG_LWLOCK macro, which is not defined in this file; it can be
8 * defined by the caller for special purposes.
9 *
10 * Also, generate-lwlocknames.pl processes this file to create lwlocknames.h.
11 *
12 * Portions Copyright (c) 1996-2025, PostgreSQL Global Development Group
13 * Portions Copyright (c) 1994, Regents of the University of California
14 *
15 * IDENTIFICATION
16 * src/include/storage/lwlocklist.h
17 *
18 *-------------------------------------------------------------------------
19 */
20
21/*
22 * Some commonly-used locks have predefined positions within MainLWLockArray;
23 * these are defined here. If you add a lock, add it to the end to avoid
24 * renumbering the existing locks; if you remove a lock, consider leaving a gap
25 * in the numbering sequence for the benefit of DTrace and other external
26 * debugging scripts. Also, do not forget to update the section
27 * WaitEventLWLock of src/backend/utils/activity/wait_event_names.txt.
28 *
29 * Note that the names here don't include the Lock suffix, to appease the
30 * C preprocessor; it's added elsewhere.
31 */
32
33/* 0 is available; was formerly BufFreelistLock */
35PG_LWLOCK(2, OidGen)
36PG_LWLOCK(3, XidGen)
37PG_LWLOCK(4, ProcArray)
38PG_LWLOCK(5, SInvalRead)
39PG_LWLOCK(6, SInvalWrite)
40/* 7 was WALBufMapping */
41PG_LWLOCK(8, WALWrite)
43/* 10 was CheckpointLock */
44/* 11 was XactSLRULock */
45/* 12 was SubtransSLRULock */
46PG_LWLOCK(13, MultiXactGen)
47/* 14 was MultiXactOffsetSLRULock */
48/* 15 was MultiXactMemberSLRULock */
49PG_LWLOCK(16, RelCacheInit)
50PG_LWLOCK(17, CheckpointerComm)
52PG_LWLOCK(19, TablespaceCreate)
53PG_LWLOCK(20, BtreeVacuum)
54PG_LWLOCK(21, AddinShmemInit)
55PG_LWLOCK(22, Autovacuum)
56PG_LWLOCK(23, AutovacuumSchedule)
57PG_LWLOCK(24, SyncScan)
58PG_LWLOCK(25, RelationMapping)
59/* 26 was NotifySLRULock */
60PG_LWLOCK(27, NotifyQueue)
61PG_LWLOCK(28, SerializableXactHash)
62PG_LWLOCK(29, SerializableFinishedList)
63PG_LWLOCK(30, SerializablePredicateList)
64/* 31 was SerialSLRULock */
65PG_LWLOCK(32, SyncRep)
67PG_LWLOCK(34, DynamicSharedMemoryControl)
68PG_LWLOCK(35, AutoFile)
69PG_LWLOCK(36, ReplicationSlotAllocation)
70PG_LWLOCK(37, ReplicationSlotControl)
71/* 38 was CommitTsSLRULock */
72PG_LWLOCK(39, CommitTs)
73PG_LWLOCK(40, ReplicationOrigin)
74PG_LWLOCK(41, MultiXactTruncation)
75/* 42 was OldSnapshotTimeMapLock */
77PG_LWLOCK(44, XactTruncation)
78/* 45 was XactTruncationLock until removal of BackendRandomLock */
79PG_LWLOCK(46, WrapLimitsVacuum)
80PG_LWLOCK(47, NotifyQueueTail)
81PG_LWLOCK(48, WaitEventCustom)
82PG_LWLOCK(49, WALSummarizer)
83PG_LWLOCK(50, DSMRegistry)
84PG_LWLOCK(51, InjectionPoint)
#define PG_LWLOCK(id, lockname)
static HTAB * ShmemIndex
Definition: shmem.c:91
static TwoPhaseStateData * TwoPhaseState
Definition: twophase.c:188
static ControlFileData * ControlFile
Definition: xlog.c:585