PostgreSQL Source Code  git master
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-2024, 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 */
35 PG_LWLOCK(2, OidGen)
36 PG_LWLOCK(3, XidGen)
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)
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)
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)
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 */
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, WaitEventExtension)
82 PG_LWLOCK(49, WALSummarizer)
83 PG_LWLOCK(50, DSMRegistry)
84 PG_LWLOCK(51, InjectionPoint)
#define PG_LWLOCK(id, lockname)
static HTAB * ShmemIndex
Definition: shmem.c:90
static TwoPhaseStateData * TwoPhaseState
Definition: twophase.c:188
static ControlFileData * ControlFile
Definition: xlog.c:569