1 /*-------------------------------------------------------------------------
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.
10 * Also, generate-lwlocknames.pl processes this file to create lwlocknames.h.
12 * Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
13 * Portions Copyright (c) 1994, Regents of the University of California
16 * src/include/storage/lwlocklist.h
18 *-------------------------------------------------------------------------
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.
29 * Note that the names here don't include the Lock suffix, to appease the
30 * C preprocessor; it's added elsewhere.
33 /* 0 is available; was formerly BufFreelistLock */
34 PG_LWLOCK(1, ShmemIndex
)
37 PG_LWLOCK(4, ProcArray
)
38 PG_LWLOCK(5, SInvalRead
)
39 PG_LWLOCK(6, SInvalWrite
)
40 PG_LWLOCK(7, WALBufMapping
)
41 PG_LWLOCK(8, WALWrite
)
42 PG_LWLOCK(9, ControlFile
)
43 /* 10 was CheckpointLock */
44 /* 11 was XactSLRULock */
45 /* 12 was SubtransSLRULock */
46 PG_LWLOCK(13, MultiXactGen
)
47 /* 14 was MultiXactOffsetSLRULock */
48 /* 15 was MultiXactMemberSLRULock */
49 PG_LWLOCK(16, RelCacheInit
)
50 PG_LWLOCK(17, CheckpointerComm
)
51 PG_LWLOCK(18, TwoPhaseState
)
52 PG_LWLOCK(19, TablespaceCreate
)
53 PG_LWLOCK(20, BtreeVacuum
)
54 PG_LWLOCK(21, AddinShmemInit
)
55 PG_LWLOCK(22, Autovacuum
)
56 PG_LWLOCK(23, AutovacuumSchedule
)
57 PG_LWLOCK(24, SyncScan
)
58 PG_LWLOCK(25, RelationMapping
)
59 /* 26 was NotifySLRULock */
60 PG_LWLOCK(27, NotifyQueue
)
61 PG_LWLOCK(28, SerializableXactHash
)
62 PG_LWLOCK(29, SerializableFinishedList
)
63 PG_LWLOCK(30, SerializablePredicateList
)
64 /* 31 was SerialSLRULock */
65 PG_LWLOCK(32, SyncRep
)
66 PG_LWLOCK(33, BackgroundWorker
)
67 PG_LWLOCK(34, DynamicSharedMemoryControl
)
68 PG_LWLOCK(35, AutoFile
)
69 PG_LWLOCK(36, ReplicationSlotAllocation
)
70 PG_LWLOCK(37, ReplicationSlotControl
)
71 /* 38 was CommitTsSLRULock */
72 PG_LWLOCK(39, CommitTs
)
73 PG_LWLOCK(40, ReplicationOrigin
)
74 PG_LWLOCK(41, MultiXactTruncation
)
75 /* 42 was OldSnapshotTimeMapLock */
76 PG_LWLOCK(43, LogicalRepWorker
)
77 PG_LWLOCK(44, XactTruncation
)
78 /* 45 was XactTruncationLock until removal of BackendRandomLock */
79 PG_LWLOCK(46, WrapLimitsVacuum
)
80 PG_LWLOCK(47, NotifyQueueTail
)
81 PG_LWLOCK(48, WaitEventCustom
)
82 PG_LWLOCK(49, WALSummarizer
)
83 PG_LWLOCK(50, DSMRegistry
)
84 PG_LWLOCK(51, InjectionPoint
)
85 PG_LWLOCK(52, SerialControl
)