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 */
44/* 10 was CheckpointLock */
45/* 11 was XactSLRULock */
46/* 12 was SubtransSLRULock */
48/* 14 was MultiXactOffsetSLRULock */
49/* 15 was MultiXactMemberSLRULock */
60/* 26 was NotifySLRULock */
65/* 31 was SerialSLRULock */
72/* 38 was CommitTsSLRULock */
76/* 42 was OldSnapshotTimeMapLock */
79/* 45 was XactTruncationLock until removal of BackendRandomLock */
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 */
#define PG_LWLOCK(id, lockname)
#define PG_LWLOCKTRANCHE(id, lockname)
static int fb(int x)
static HTAB * ShmemIndex
Definition shmem.c:93
static TwoPhaseStateData * TwoPhaseState
Definition twophase.c:189
static ControlFileData * ControlFile
Definition xlog.c:576