This is the multi-page printable view of this section. .
LWLock waits
- 1: LWLock: AddinShmemInit
- 2: LWLock: AioUringCompletion
- 3: LWLock: AioWorkerSubmissionQueue
- 4: LWLock: AutoFile
- 5: LWLock: Autovacuum
- 6: LWLock: AutovacuumSchedule
- 7: LWLock: BackgroundWorker
- 8: LWLock: BtreeVacuum
- 9: LWLock: BufferContent
- 10: LWLock: BufferMapping
- 11: LWLock: Checkpoint
- 12: LWLock: CheckpointerComm
- 13: LWLock: CommitTs
- 14: LWLock: CommitTsBuffer
- 15: LWLock: CommitTsSLRU
- 16: LWLock: ControlFile
- 17: LWLock: DSMRegistry
- 18: LWLock: DSMRegistryDSA
- 19: LWLock: DSMRegistryHash
- 20: LWLock: DynamicSharedMemoryControl
- 21: LWLock: InjectionPoint
- 22: LWLock: LockFastPath
- 23: LWLock: LockManager
- 24: LWLock: LogicalRepLauncherDSA
- 25: LWLock: LogicalRepLauncherHash
- 26: LWLock: LogicalRepWorker
- 27: LWLock: MultiXactGen
- 28: LWLock: MultiXactMemberBuffer
- 29: LWLock: MultiXactMemberSLRU
- 30: LWLock: MultiXactOffsetBuffer
- 31: LWLock: MultiXactOffsetSLRU
- 32: LWLock: MultiXactTruncation
- 33: LWLock: NotifyBuffer
- 34: LWLock: NotifyQueue
- 35: LWLock: NotifyQueueTail
- 36: LWLock: NotifySLRU
- 37: LWLock: OidGen
- 38: LWLock: OldSnapshotTimeMap
- 39: LWLock: ParallelAppend
- 40: LWLock: ParallelBtreeScan
- 41: LWLock: ParallelHashJoin
- 42: LWLock: ParallelQueryDSA
- 43: LWLock: ParallelVacuumDSA
- 44: LWLock: PerSessionDSA
- 45: LWLock: PerSessionRecordType
- 46: LWLock: PerSessionRecordTypmod
- 47: LWLock: PerXactPredicateList
- 48: LWLock: PgStatsDSA
- 49: LWLock: PgStatsData
- 50: LWLock: PgStatsHash
- 51: LWLock: PredicateLockManager
- 52: LWLock: ProcArray
- 53: LWLock: RelCacheInit
- 54: LWLock: RelationMapping
- 55: LWLock: ReplicationOrigin
- 56: LWLock: ReplicationOriginState
- 57: LWLock: ReplicationSlotAllocation
- 58: LWLock: ReplicationSlotControl
- 59: LWLock: ReplicationSlotIO
- 60: LWLock: SInvalRead
- 61: LWLock: SInvalWrite
- 62: LWLock: SerialBuffer
- 63: LWLock: SerialControl
- 64: LWLock: SerialSLRU
- 65: LWLock: SerializableFinishedList
- 66: LWLock: SerializablePredicateList
- 67: LWLock: SerializableXactHash
- 68: LWLock: SharedTidBitmap
- 69: LWLock: SharedTupleStore
- 70: LWLock: ShmemIndex
- 71: LWLock: SubtransBuffer
- 72: LWLock: SubtransSLRU
- 73: LWLock: SyncRep
- 74: LWLock: SyncScan
- 75: LWLock: TablespaceCreate
- 76: LWLock: TwoPhaseState
- 77: LWLock: WALBufMapping
- 78: LWLock: WALInsert
- 79: LWLock: WALSummarizer
- 80: LWLock: WALWrite
- 81: LWLock: WaitEventCustom
- 82: LWLock: WrapLimitsVacuum
- 83: LWLock: XactBuffer
- 84: LWLock: XactSLRU
- 85: LWLock: XactTruncation
- 86: LWLock: XidGen
LWLock means a backend could not immediately acquire a lightweight lock that protects an internal shared-memory structure. It does not identify a SQL row or table lock, and pg_locks usually cannot name its owner.
repeat samples → isolate one hot tranche → correlate with workloadHow to read this class
A single sample is ordinary scheduler noise. Treat the event as contention only when the same LWLock name recurs across consecutive samples and affects foreground sessions whose latency has increased.
- Normal: brief appearances during WAL generation, snapshot acquisition, buffer lookup, vacuum, or checkpoint work.
- Watch: the same event occupies at least 10% of active foreground backends in three consecutive 1-second snapshots.
- Urgent: at least 25% of active foreground backends pile onto one event, waits persist beyond 5 seconds, or throughput collapses at the same time.
The percentages are operational triage thresholds, not PostgreSQL guarantees. Compare with the cluster’s own baseline and exclude background processes whose main loop is expected to wait.
Ten events worth recognizing
| Event | Protected resource | Typical story |
|---|---|---|
| BufferContent | Contents of one shared buffer | Many sessions touch the same hot page |
| BufferMapping | Buffer-table mapping partitions | Working-set churn or broad concurrent scans |
| LockManager | Heavyweight lock manager state | Large lock fan-out, DDL, or lock storms |
| ProcArray | Shared process/transaction array | Snapshot and transaction-ID pressure |
| WALBufMapping | WAL buffer page mapping | WAL buffers turn over under write pressure |
| WALInsert | WAL insertion state | Many writers serialize while inserting WAL |
| WALWrite | WAL buffer write coordination | WAL flush/write path cannot keep up |
| XactSLRU | Transaction-status SLRU | pg_xact cache churn or old visibility checks |
| MultiXactMemberSLRU | Multixact-member SLRU | Heavy row-locking and multixact churn |
| SyncRep | Synchronous replication wait queues | Commit acknowledgements and sender state contend |
Common misreads
- “LWLock means a leaked lock.” No. It is a short internal critical section; sustained recurrence is the signal.
- “The query shown owns the lock.”
pg_stat_activity.querybelongs to the waiter. The holder can be another backend inside a different source path. - “More CPU fixes it.” Extra concurrency can intensify a shared-memory hotspot. First identify the protected resource and workload shape.
- “
pg_lockswill reveal the blocker.” It covers heavyweight and predicate locks, not general LWLock ownership.
Start with BufferContent for a page-level hotspot and WALInsert for a write-heavy cluster.
1 - LWLock: AddinShmemInit
AddinShmemInit
VersionsPG 13-18
Evidence3 source location(s)
Official description
Waiting to manage an extension’s space allocation in shared memory
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:739 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/utils/activity/wait_event_names.txt:328. The instrumented operation is: Waiting to manage an extension’s space allocation in shared memory. LWLockAcquire could not immediately take the lightweight-lock tranche displayed as AddinShmemInit. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:328 —
AddinShmemInit - PostgreSQL 18.6 · src/test/modules/injection_points/injection_points.c:136 —
AddinShmemInit
Related controls and signals
- GUCs: None directly.
- Metrics: [metric:waiting_sessions] · [metric:wait_event_share]
2 - LWLock: AioUringCompletion
AioUringCompletion
VersionsPG 18
Evidence3 source location(s)
Official description
Waiting for another process to complete IO via io_uring
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| — | — | — | — | — | ✓ |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:739 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/storage/lmgr/lwlock.c:180. The instrumented operation is: Waiting for another process to complete IO via io_uring. LWLockAcquire could not immediately take the lightweight-lock tranche displayed as AioUringCompletion. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:180 —
AioUringCompletion - PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:405 —
AioUringCompletion
Related controls and signals
- GUCs: None directly.
- Metrics: [metric:waiting_sessions] · [metric:wait_event_share]
3 - LWLock: AioWorkerSubmissionQueue
AioWorkerSubmissionQueue
VersionsPG 18
Evidence3 source location(s)
Official description
Waiting to access AIO worker submission queue
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| — | — | — | — | — | ✓ |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:739 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/storage/aio/method_worker.c:253. The instrumented operation is: Waiting to access AIO worker submission queue. LWLockAcquire could not immediately take the lightweight-lock tranche displayed as AioWorkerSubmissionQueue. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 18.6 · src/backend/storage/aio/method_worker.c:253 —
AioWorkerSubmissionQueue - PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:355 —
AioWorkerSubmissionQueue
Related controls and signals
- GUCs: None directly.
- Metrics: [metric:waiting_sessions] · [metric:wait_event_share]
4 - LWLock: AutoFile
AutoFile
VersionsPG 13-18
Evidence3 source location(s)
Official description
Waiting to update the postgresql.auto.conf file
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:739 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/utils/activity/wait_event_names.txt:340. The instrumented operation is: Waiting to update the postgresql.auto.conf file. LWLockAcquire could not immediately take the lightweight-lock tranche displayed as AutoFile. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:340 —
AutoFile - PostgreSQL 18.6 · src/backend/utils/misc/guc.c:4760 —
AutoFile
Related controls and signals
- GUCs: None directly.
- Metrics: [metric:waiting_sessions] · [metric:wait_event_share]
5 - LWLock: Autovacuum
Autovacuum
VersionsPG 13-18
Evidence3 source location(s)
Official description
Waiting to read or update the current state of autovacuum workers
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:739 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/postmaster/autovacuum.c:611. The instrumented operation is: Waiting to read or update the current state of autovacuum workers. LWLockAcquire could not immediately take the lightweight-lock tranche displayed as Autovacuum. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 18.6 · src/backend/postmaster/autovacuum.c:611 —
Autovacuum - PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:329 —
Autovacuum
Related controls and signals
6 - LWLock: AutovacuumSchedule
AutovacuumSchedule
VersionsPG 13-18
Evidence3 source location(s)
Official description
Waiting to ensure that a table selected for autovacuum still needs vacuuming
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:739 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/postmaster/autovacuum.c:2337. The instrumented operation is: Waiting to ensure that a table selected for autovacuum still needs vacuuming. LWLockAcquire could not immediately take the lightweight-lock tranche displayed as AutovacuumSchedule. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 18.6 · src/backend/postmaster/autovacuum.c:2337 —
AutovacuumSchedule - PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:330 —
AutovacuumSchedule
Related controls and signals
7 - LWLock: BackgroundWorker
BackgroundWorker
VersionsPG 13-18
Evidence3 source location(s)
Official description
Waiting to read or update background worker state
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:739 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/postmaster/bgworker.c:1070. The instrumented operation is: Waiting to read or update background worker state. LWLockAcquire could not immediately take the lightweight-lock tranche displayed as BackgroundWorker. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 18.6 · src/backend/postmaster/bgworker.c:1070 —
BackgroundWorker - PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:338 —
BackgroundWorker
Related controls and signals
- GUCs: None directly.
- Metrics: [metric:waiting_sessions] · [metric:wait_event_share]
8 - LWLock: BtreeVacuum
BtreeVacuum
VersionsPG 13-18
Evidence3 source location(s)
Official description
Waiting to read or update vacuum-related information for a B-tree index
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:739 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/access/nbtree/nbtutils.c:3519. The instrumented operation is: Waiting to read or update vacuum-related information for a B-tree index. LWLockAcquire could not immediately take the lightweight-lock tranche displayed as BtreeVacuum. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 18.6 · src/backend/access/nbtree/nbtutils.c:3519 —
BtreeVacuum - PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:327 —
BtreeVacuum
Related controls and signals
9 - LWLock: BufferContent
BufferContent
VersionsPG 13-18
Evidence3 source location(s)
Official description
Waiting to access a data page in memory
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Trigger mechanism
A backend has found the shared buffer it needs but cannot yet take that buffer descriptor’s content lock. Heap and index code acquire this lock before reading or changing the in-memory page, so many workers touching one page can serialize here.
Normal or trouble?
- Normal: Short samples are routine while concurrent readers and writers touch shared pages.
- Investigate: Repeated samples on many foreground sessions usually point to a hot heap/index page, a right-growing index, or concurrent maintenance on the same blocks.
Diagnostic SQL
Response
- Find the relations and statements shared by the waiters.
- Use page/index evidence to confirm a hotspot; do not infer one from the wait name alone.
- Spread hot keys, batch writes, or move maintenance away from the peak before considering capacity changes.
Source evidence
- PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:148 —
BufferContent - PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:373 —
BufferContent
Related controls and signals
- GUCs: [guc:shared_buffers]
- Metrics: [metric:waiting_sessions] · [metric:wait_event_share] · [metric:statement_latency]
Typical incident pattern
A monotonically increasing key concentrates concurrent B-tree inserts on the rightmost leaf page; BufferContent rises with insert latency.
10 - LWLock: BufferMapping
BufferMapping
VersionsPG 13-18
Evidence3 source location(s)
Official description
Waiting to associate a data block with a buffer in the buffer pool
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Trigger mechanism
The buffer manager hashes a relation/fork/block tag into a partition protected by BufferMappingLock. Lookup, insertion, eviction, and tag reassignment briefly take that partition lock; broad concurrent misses or buffer churn increase collisions.
Normal or trouble?
- Normal: Brief waits occur when pages enter or leave shared buffers.
- Investigate: Sustained recurrence suggests a working set that churns through shared buffers, many parallel scans, or concentrated access mapping into a few partitions.
Diagnostic SQL
Response
- Correlate with buffer hit ratio and read volume by database and statement.
- Look for a new scan, undersized cache, or concurrency jump.
- Reduce concurrent scan fan-out or fix the access path before simply enlarging shared_buffers.
Source evidence
- PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:152 —
BufferMapping - PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:377 —
BufferMapping
Related controls and signals
- GUCs: [guc:shared_buffers] · [guc:max_parallel_workers_per_gather]
- Metrics: [metric:waiting_sessions] · [metric:wait_event_share] · [metric:buffer_hit_ratio] · [metric:blocks_read]
Typical incident pattern
A plan regression launches many concurrent large scans; buffer-table partitions become hot while useful pages churn out of cache.
11 - LWLock: Checkpoint
Checkpoint
VersionsPG 13
Evidence3 source location(s)
Official description
Waiting to begin a checkpoint.
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| ✓ | — | — | — | — | — |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:765 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/access/transam/xlog.c:8957. The instrumented operation is: Waiting to begin a checkpoint. LWLockAcquire could not immediately take the lightweight-lock tranche displayed as Checkpoint. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 13.23 · src/backend/access/transam/xlog.c:8957 —
Checkpoint - PostgreSQL 13.23 · src/backend/storage/lmgr/lwlock.c:765 —
pgstat_report_wait_start - PostgreSQL 13.23 · src/backend/storage/lmgr/lwlocknames.c:14 —
Checkpoint
Related controls and signals
12 - LWLock: CheckpointerComm
CheckpointerComm
VersionsPG 13-18
Evidence3 source location(s)
Official description
Waiting to manage fsync requests
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:739 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/postmaster/checkpointer.c:1164. The instrumented operation is: Waiting to manage fsync requests. LWLockAcquire could not immediately take the lightweight-lock tranche displayed as CheckpointerComm. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 18.6 · src/backend/postmaster/checkpointer.c:1164 —
CheckpointerComm - PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:324 —
CheckpointerComm
Related controls and signals
13 - LWLock: CommitTs
CommitTs
VersionsPG 13-18
Evidence3 source location(s)
Official description
Waiting to read or update the last value set for a transaction commit timestamp
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:739 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/access/transam/commit_ts.c:206. The instrumented operation is: Waiting to read or update the last value set for a transaction commit timestamp. LWLockAcquire could not immediately take the lightweight-lock tranche displayed as CommitTs. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 18.6 · src/backend/access/transam/commit_ts.c:206 —
CommitTs - PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:343 —
CommitTs
Related controls and signals
- GUCs: None directly.
- Metrics: [metric:waiting_sessions] · [metric:wait_event_share]
14 - LWLock: CommitTsBuffer
CommitTsBuffer
VersionsPG 13-18
Evidence3 source location(s)
Official description
Waiting for I/O on a commit timestamp SLRU buffer
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:739 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/storage/lmgr/lwlock.c:141. The instrumented operation is: Waiting for I/O on a commit timestamp SLRU buffer. LWLockAcquire could not immediately take the lightweight-lock tranche displayed as CommitTsBuffer. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:141 —
CommitTsBuffer - PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:366 —
CommitTsBuffer
Related controls and signals
- GUCs: None directly.
- Metrics: [metric:waiting_sessions] · [metric:wait_event_share]
15 - LWLock: CommitTsSLRU
CommitTsSLRU
VersionsPG 13-18
Evidence3 source location(s)
Official description
Waiting to access the commit timestamp SLRU cache
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:739 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/storage/lmgr/lwlock.c:172. The instrumented operation is: Waiting to access the commit timestamp SLRU cache. LWLockAcquire could not immediately take the lightweight-lock tranche displayed as CommitTsSLRU. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:172 —
CommitTsSLRU - PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:397 —
CommitTsSLRU
Related controls and signals
- GUCs: None directly.
- Metrics: [metric:waiting_sessions] · [metric:wait_event_share]
16 - LWLock: ControlFile
ControlFile
VersionsPG 13-18
Evidence3 source location(s)
Official description
Waiting to read or update the pg_control file or create a new WAL file
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:739 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/access/transam/xlog.c:2723. The instrumented operation is: Waiting to read or update the pg_control file or create a new WAL file. LWLockAcquire could not immediately take the lightweight-lock tranche displayed as ControlFile. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 18.6 · src/backend/access/transam/xlog.c:2723 —
ControlFile - PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:321 —
ControlFile
Related controls and signals
- GUCs: None directly.
- Metrics: [metric:waiting_sessions] · [metric:wait_event_share]
17 - LWLock: DSMRegistry
DSMRegistry
VersionsPG 17-18
Evidence3 source location(s)
Official description
Waiting to read or update the dynamic shared memory registry
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| — | — | — | — | ✓ | ✓ |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:739 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/storage/ipc/dsm_registry.c:98. The instrumented operation is: Waiting to read or update the dynamic shared memory registry. LWLockAcquire could not immediately take the lightweight-lock tranche displayed as DSMRegistry. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 18.6 · src/backend/storage/ipc/dsm_registry.c:98 —
DSMRegistry - PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:352 —
DSMRegistry
Related controls and signals
- GUCs: None directly.
- Metrics: [metric:waiting_sessions] · [metric:wait_event_share]
18 - LWLock: DSMRegistryDSA
DSMRegistryDSA
VersionsPG 17-18
Evidence3 source location(s)
Official description
Waiting to access dynamic shared memory registry’s dynamic shared memory allocator
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| — | — | — | — | ✓ | ✓ |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:739 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/storage/lmgr/lwlock.c:170. The instrumented operation is: Waiting to access dynamic shared memory registry’s dynamic shared memory allocator. LWLockAcquire could not immediately take the lightweight-lock tranche displayed as DSMRegistryDSA. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:170 —
DSMRegistryDSA - PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:395 —
DSMRegistryDSA
Related controls and signals
- GUCs: None directly.
- Metrics: [metric:waiting_sessions] · [metric:wait_event_share]
19 - LWLock: DSMRegistryHash
DSMRegistryHash
VersionsPG 17-18
Evidence3 source location(s)
Official description
Waiting to access dynamic shared memory registry’s shared hash table
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| — | — | — | — | ✓ | ✓ |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:739 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/storage/lmgr/lwlock.c:171. The instrumented operation is: Waiting to access dynamic shared memory registry’s shared hash table. LWLockAcquire could not immediately take the lightweight-lock tranche displayed as DSMRegistryHash. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:171 —
DSMRegistryHash - PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:396 —
DSMRegistryHash
Related controls and signals
- GUCs: None directly.
- Metrics: [metric:waiting_sessions] · [metric:wait_event_share]
20 - LWLock: DynamicSharedMemoryControl
DynamicSharedMemoryControl
VersionsPG 13-18
Evidence3 source location(s)
Official description
Waiting to read or update dynamic shared memory allocation information
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:739 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/storage/ipc/dsm.c:549. The instrumented operation is: Waiting to read or update dynamic shared memory allocation information. LWLockAcquire could not immediately take the lightweight-lock tranche displayed as DynamicSharedMemoryControl. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 18.6 · src/backend/storage/ipc/dsm.c:549 —
DynamicSharedMemoryControl - PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:339 —
DynamicSharedMemoryControl
Related controls and signals
- GUCs: None directly.
- Metrics: [metric:waiting_sessions] · [metric:wait_event_share]
21 - LWLock: InjectionPoint
InjectionPoint
VersionsPG 17-18
Evidence3 source location(s)
Official description
Waiting to read or update information related to injection points
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| — | — | — | — | ✓ | ✓ |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:739 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/utils/activity/wait_event_names.txt:353. The instrumented operation is: Waiting to read or update information related to injection points. LWLockAcquire could not immediately take the lightweight-lock tranche displayed as InjectionPoint. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:353 —
InjectionPoint - PostgreSQL 18.6 · src/backend/utils/misc/injection_point.c:302 —
InjectionPoint
Related controls and signals
- GUCs: None directly.
- Metrics: [metric:waiting_sessions] · [metric:wait_event_share]
22 - LWLock: LockFastPath
LockFastPath
VersionsPG 13-18
Evidence3 source location(s)
Official description
Waiting to read or update a process’ fast-path lock information
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:739 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/storage/lmgr/lwlock.c:151. The instrumented operation is: Waiting to read or update a process’ fast-path lock information. LWLockAcquire could not immediately take the lightweight-lock tranche displayed as LockFastPath. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:151 —
LockFastPath - PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:376 —
LockFastPath
Related controls and signals
- GUCs: None directly.
- Metrics: [metric:waiting_sessions] · [metric:wait_event_share]
23 - LWLock: LockManager
LockManager
VersionsPG 13-18
Evidence3 source location(s)
Official description
Waiting to read or update information about “heavyweight” locks
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Trigger mechanism
Heavyweight lock bookkeeping is stored in shared hash tables partitioned by LockHashPartitionLock. Acquiring, granting, releasing, or inspecting many heavyweight locks can contend on the partition even when no SQL-level lock conflict exists.
Normal or trouble?
- Normal: Small bursts accompany ordinary relation and transaction lock traffic.
- Investigate: A sustained share often follows lock fan-out: very large transactions, many partitions, DDL churn, or thousands of waiting lock requests.
Diagnostic SQL
Response
- Count pg_locks rows per PID and inspect the blocking tree.
- Identify statements touching many relations or partitions.
- Shorten transactions and reduce lock fan-out; raise max_locks_per_transaction only for genuine capacity errors.
Source evidence
- PostgreSQL 18.6 · src/backend/storage/ipc/ipci.c:117 —
LockManager - PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:378 —
LockManager
Related controls and signals
- GUCs: [guc:max_locks_per_transaction] · [guc:max_connections]
- Metrics: [metric:waiting_sessions] · [metric:wait_event_share] · [metric:locks_per_backend] · [metric:blocked_sessions]
Typical incident pattern
A deployment runs DDL across thousands of partitions while application sessions acquire relation locks, creating internal lock-table contention before a clear blocker is visible.
24 - LWLock: LogicalRepLauncherDSA
LogicalRepLauncherDSA
VersionsPG 16-18
Evidence3 source location(s)
Official description
Waiting to access logical replication launcher’s dynamic shared memory allocator
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| — | — | — | ✓ | ✓ | ✓ |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:739 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/storage/lmgr/lwlock.c:168. The instrumented operation is: Waiting to access logical replication launcher’s dynamic shared memory allocator. LWLockAcquire could not immediately take the lightweight-lock tranche displayed as LogicalRepLauncherDSA. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:168 —
LogicalRepLauncherDSA - PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:393 —
LogicalRepLauncherDSA
Related controls and signals
- GUCs: None directly.
- Metrics: [metric:waiting_sessions] · [metric:wait_event_share]
25 - LWLock: LogicalRepLauncherHash
LogicalRepLauncherHash
VersionsPG 16-18
Evidence3 source location(s)
Official description
Waiting to access logical replication launcher’s shared hash table
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| — | — | — | ✓ | ✓ | ✓ |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:739 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/storage/lmgr/lwlock.c:169. The instrumented operation is: Waiting to access logical replication launcher’s shared hash table. LWLockAcquire could not immediately take the lightweight-lock tranche displayed as LogicalRepLauncherHash. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:169 —
LogicalRepLauncherHash - PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:394 —
LogicalRepLauncherHash
Related controls and signals
- GUCs: None directly.
- Metrics: [metric:waiting_sessions] · [metric:wait_event_share]
26 - LWLock: LogicalRepWorker
LogicalRepWorker
VersionsPG 13-18
Evidence3 source location(s)
Official description
Waiting to read or update the state of logical replication workers
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:739 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/replication/logical/launcher.c:189. The instrumented operation is: Waiting to read or update the state of logical replication workers. LWLockAcquire could not immediately take the lightweight-lock tranche displayed as LogicalRepWorker. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 18.6 · src/backend/replication/logical/launcher.c:189 —
LogicalRepWorker - PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:346 —
LogicalRepWorker
Related controls and signals
- GUCs: None directly.
- Metrics: [metric:waiting_sessions] · [metric:wait_event_share]
27 - LWLock: MultiXactGen
MultiXactGen
VersionsPG 13-18
Evidence3 source location(s)
Official description
Waiting to read or update shared multixact state
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:739 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/access/transam/multixact.c:738. The instrumented operation is: Waiting to read or update shared multixact state. LWLockAcquire could not immediately take the lightweight-lock tranche displayed as MultiXactGen. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 18.6 · src/backend/access/transam/multixact.c:738 —
MultiXactGen - PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:322 —
MultiXactGen
Related controls and signals
28 - LWLock: MultiXactMemberBuffer
MultiXactMemberBuffer
VersionsPG 13-18
Evidence3 source location(s)
Official description
Waiting for I/O on a multixact member SLRU buffer
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:739 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/storage/lmgr/lwlock.c:144. The instrumented operation is: Waiting for I/O on a multixact member SLRU buffer. LWLockAcquire could not immediately take the lightweight-lock tranche displayed as MultiXactMemberBuffer. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:144 —
MultiXactMemberBuffer - PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:369 —
MultiXactMemberBuffer
Related controls and signals
29 - LWLock: MultiXactMemberSLRU
MultiXactMemberSLRU
VersionsPG 13-18
Evidence3 source location(s)
Official description
Waiting to access the multixact member SLRU cache
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Trigger mechanism
This lock protects the SLRU cache for pg_multixact/members, which stores the transaction members of multitransaction IDs used by shared row locks. Concurrent row-lock creation and old member lookups meet here.
Normal or trouble?
- Normal: Brief waits occur in workloads that use SELECT FOR SHARE/KEY SHARE or create multixacts through foreign-key checks.
- Investigate: Sustained contention points to heavy shared row locking, multixact churn, lagging freeze, or slow pg_multixact storage.
Diagnostic SQL
Response
- Find statements and tables creating many shared row locks.
- Check multixact age and autovacuum progress.
- Reduce lock fan-out and unblock multixact freeze; investigate member SLRU I/O if paired with buffer waits.
Source evidence
- PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:174 —
MultiXactMemberSLRU - PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:399 —
MultiXactMemberSLRU
Related controls and signals
- GUCs: [guc:autovacuum_multixact_freeze_max_age] · [guc:vacuum_multixact_freeze_table_age]
- Metrics: [metric:waiting_sessions] · [metric:wait_event_share] · [metric:oldest_multixact_age] · [metric:multixact_member_io]
Typical incident pattern
A high-fan-out foreign-key workload locks many parent rows while a long transaction delays multixact cleanup, driving member-cache contention.
30 - LWLock: MultiXactOffsetBuffer
MultiXactOffsetBuffer
VersionsPG 13-18
Evidence3 source location(s)
Official description
Waiting for I/O on a multixact offset SLRU buffer
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:739 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/storage/lmgr/lwlock.c:143. The instrumented operation is: Waiting for I/O on a multixact offset SLRU buffer. LWLockAcquire could not immediately take the lightweight-lock tranche displayed as MultiXactOffsetBuffer. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:143 —
MultiXactOffsetBuffer - PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:368 —
MultiXactOffsetBuffer
Related controls and signals
31 - LWLock: MultiXactOffsetSLRU
MultiXactOffsetSLRU
VersionsPG 13-18
Evidence3 source location(s)
Official description
Waiting to access the multixact offset SLRU cache
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:739 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/storage/lmgr/lwlock.c:173. The instrumented operation is: Waiting to access the multixact offset SLRU cache. LWLockAcquire could not immediately take the lightweight-lock tranche displayed as MultiXactOffsetSLRU. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:173 —
MultiXactOffsetSLRU - PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:398 —
MultiXactOffsetSLRU
Related controls and signals
32 - LWLock: MultiXactTruncation
MultiXactTruncation
VersionsPG 13-18
Evidence3 source location(s)
Official description
Waiting to read or truncate multixact information
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:739 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/access/transam/multixact.c:2901. The instrumented operation is: Waiting to read or truncate multixact information. LWLockAcquire could not immediately take the lightweight-lock tranche displayed as MultiXactTruncation. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 18.6 · src/backend/access/transam/multixact.c:2901 —
MultiXactTruncation - PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:345 —
MultiXactTruncation
Related controls and signals
33 - LWLock: NotifyBuffer
NotifyBuffer
VersionsPG 13-18
Evidence3 source location(s)
Official description
Waiting for I/O on a NOTIFY message SLRU buffer
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:739 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/storage/lmgr/lwlock.c:145. The instrumented operation is: Waiting for I/O on a NOTIFY message SLRU buffer. LWLockAcquire could not immediately take the lightweight-lock tranche displayed as NotifyBuffer. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:145 —
NotifyBuffer - PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:370 —
NotifyBuffer
Related controls and signals
- GUCs: None directly.
- Metrics: [metric:waiting_sessions] · [metric:wait_event_share]
34 - LWLock: NotifyQueue
NotifyQueue
VersionsPG 13-18
Evidence3 source location(s)
Official description
Waiting to read or update NOTIFY messages
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:739 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/commands/async.c:940. The instrumented operation is: Waiting to read or update NOTIFY messages. LWLockAcquire could not immediately take the lightweight-lock tranche displayed as NotifyQueue. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 18.6 · src/backend/commands/async.c:940 —
NotifyQueue - PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:333 —
NotifyQueue
Related controls and signals
- GUCs: None directly.
- Metrics: [metric:waiting_sessions] · [metric:wait_event_share]
35 - LWLock: NotifyQueueTail
NotifyQueueTail
VersionsPG 13-18
Evidence3 source location(s)
Official description
Waiting to update limit on NOTIFY message storage
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:739 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/commands/async.c:2126. The instrumented operation is: Waiting to update limit on NOTIFY message storage. LWLockAcquire could not immediately take the lightweight-lock tranche displayed as NotifyQueueTail. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 18.6 · src/backend/commands/async.c:2126 —
NotifyQueueTail - PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:349 —
NotifyQueueTail
Related controls and signals
- GUCs: None directly.
- Metrics: [metric:waiting_sessions] · [metric:wait_event_share]
36 - LWLock: NotifySLRU
NotifySLRU
VersionsPG 13-18
Evidence3 source location(s)
Official description
Waiting to access the NOTIFY message SLRU cache
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:739 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/storage/lmgr/lwlock.c:175. The instrumented operation is: Waiting to access the NOTIFY message SLRU cache. LWLockAcquire could not immediately take the lightweight-lock tranche displayed as NotifySLRU. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:175 —
NotifySLRU - PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:400 —
NotifySLRU
Related controls and signals
- GUCs: None directly.
- Metrics: [metric:waiting_sessions] · [metric:wait_event_share]
37 - LWLock: OidGen
OidGen
VersionsPG 13-18
Evidence3 source location(s)
Official description
Waiting to allocate a new OID
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:739 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/access/transam/varsup.c:563. The instrumented operation is: Waiting to allocate a new OID. LWLockAcquire could not immediately take the lightweight-lock tranche displayed as OidGen. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 18.6 · src/backend/access/transam/varsup.c:563 —
OidGen - PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:314 —
OidGen
Related controls and signals
- GUCs: None directly.
- Metrics: [metric:waiting_sessions] · [metric:wait_event_share]
38 - LWLock: OldSnapshotTimeMap
OldSnapshotTimeMap
VersionsPG 13-16
Evidence2 source location(s)
Official description
Waiting to read or update old snapshot control information.
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | ✓ | — | — |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:750 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/utils/time/snapmgr.c:1758. The instrumented operation is: Waiting to read or update old snapshot control information. LWLockAcquire could not immediately take the lightweight-lock tranche displayed as OldSnapshotTimeMap. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 16.15 · src/backend/storage/lmgr/lwlock.c:750 —
pgstat_report_wait_start - PostgreSQL 16.15 · src/backend/utils/time/snapmgr.c:1758 —
OldSnapshotTimeMap
Related controls and signals
- GUCs: None directly.
- Metrics: [metric:waiting_sessions] · [metric:wait_event_share]
39 - LWLock: ParallelAppend
ParallelAppend
VersionsPG 13-18
Evidence3 source location(s)
Official description
Waiting to choose the next subplan during Parallel Append plan execution
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:739 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/executor/nodeAppend.c:69. The instrumented operation is: Waiting to choose the next subplan during Parallel Append plan execution. LWLockAcquire could not immediately take the lightweight-lock tranche displayed as ParallelAppend. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 18.6 · src/backend/executor/nodeAppend.c:69 —
ParallelAppend - PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:388 —
ParallelAppend
Related controls and signals
- GUCs: None directly.
- Metrics: [metric:waiting_sessions] · [metric:wait_event_share]
40 - LWLock: ParallelBtreeScan
ParallelBtreeScan
VersionsPG 18
Evidence3 source location(s)
Official description
Waiting to synchronize workers during Parallel B-tree scan plan execution
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| — | — | — | — | — | ✓ |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:739 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/storage/lmgr/lwlock.c:156. The instrumented operation is: Waiting to synchronize workers during Parallel B-tree scan plan execution. LWLockAcquire could not immediately take the lightweight-lock tranche displayed as ParallelBtreeScan. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:156 —
ParallelBtreeScan - PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:381 —
ParallelBtreeScan
Related controls and signals
- GUCs: None directly.
- Metrics: [metric:waiting_sessions] · [metric:wait_event_share]
41 - LWLock: ParallelHashJoin
ParallelHashJoin
VersionsPG 13-18
Evidence3 source location(s)
Official description
Waiting to synchronize workers during Parallel Hash Join plan execution
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:739 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/executor/nodeHash.c:71. The instrumented operation is: Waiting to synchronize workers during Parallel Hash Join plan execution. LWLockAcquire could not immediately take the lightweight-lock tranche displayed as ParallelHashJoin. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 18.6 · src/backend/executor/nodeHash.c:71 —
ParallelHashJoin - PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:380 —
ParallelHashJoin
Related controls and signals
- GUCs: None directly.
- Metrics: [metric:waiting_sessions] · [metric:wait_event_share]
42 - LWLock: ParallelQueryDSA
ParallelQueryDSA
VersionsPG 13-18
Evidence3 source location(s)
Official description
Waiting for parallel query dynamic shared memory allocation
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:739 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/storage/lmgr/lwlock.c:157. The instrumented operation is: Waiting for parallel query dynamic shared memory allocation. LWLockAcquire could not immediately take the lightweight-lock tranche displayed as ParallelQueryDSA. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:157 —
ParallelQueryDSA - PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:382 —
ParallelQueryDSA
Related controls and signals
- GUCs: None directly.
- Metrics: [metric:waiting_sessions] · [metric:wait_event_share]
43 - LWLock: ParallelVacuumDSA
ParallelVacuumDSA
VersionsPG 17-18
Evidence3 source location(s)
Official description
Waiting for parallel vacuum dynamic shared memory allocation
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| — | — | — | — | ✓ | ✓ |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:739 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/storage/lmgr/lwlock.c:179. The instrumented operation is: Waiting for parallel vacuum dynamic shared memory allocation. LWLockAcquire could not immediately take the lightweight-lock tranche displayed as ParallelVacuumDSA. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:179 —
ParallelVacuumDSA - PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:404 —
ParallelVacuumDSA
Related controls and signals
44 - LWLock: PerSessionDSA
PerSessionDSA
VersionsPG 13-18
Evidence3 source location(s)
Official description
Waiting for parallel query dynamic shared memory allocation
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:739 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/storage/lmgr/lwlock.c:158. The instrumented operation is: Waiting for parallel query dynamic shared memory allocation. LWLockAcquire could not immediately take the lightweight-lock tranche displayed as PerSessionDSA. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:158 —
PerSessionDSA - PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:383 —
PerSessionDSA
Related controls and signals
- GUCs: None directly.
- Metrics: [metric:waiting_sessions] · [metric:wait_event_share]
45 - LWLock: PerSessionRecordType
PerSessionRecordType
VersionsPG 13-18
Evidence3 source location(s)
Official description
Waiting to access a parallel query’s information about composite types
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:739 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/storage/lmgr/lwlock.c:159. The instrumented operation is: Waiting to access a parallel query’s information about composite types. LWLockAcquire could not immediately take the lightweight-lock tranche displayed as PerSessionRecordType. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:159 —
PerSessionRecordType - PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:384 —
PerSessionRecordType
Related controls and signals
- GUCs: None directly.
- Metrics: [metric:waiting_sessions] · [metric:wait_event_share]
46 - LWLock: PerSessionRecordTypmod
PerSessionRecordTypmod
VersionsPG 13-18
Evidence3 source location(s)
Official description
Waiting to access a parallel query’s information about type modifiers that identify anonymous record types
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:739 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/storage/lmgr/lwlock.c:160. The instrumented operation is: Waiting to access a parallel query’s information about type modifiers that identify anonymous record types. LWLockAcquire could not immediately take the lightweight-lock tranche displayed as PerSessionRecordTypmod. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:160 —
PerSessionRecordTypmod - PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:385 —
PerSessionRecordTypmod
Related controls and signals
- GUCs: None directly.
- Metrics: [metric:waiting_sessions] · [metric:wait_event_share]
47 - LWLock: PerXactPredicateList
PerXactPredicateList
VersionsPG 13-18
Evidence3 source location(s)
Official description
Waiting to access the list of predicate locks held by the current serializable transaction during a parallel query
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:739 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/storage/lmgr/lwlock.c:164. The instrumented operation is: Waiting to access the list of predicate locks held by the current serializable transaction during a parallel query. LWLockAcquire could not immediately take the lightweight-lock tranche displayed as PerXactPredicateList. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:164 —
PerXactPredicateList - PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:389 —
PerXactPredicateList
Related controls and signals
48 - LWLock: PgStatsDSA
PgStatsDSA
VersionsPG 15-18
Evidence3 source location(s)
Official description
Waiting for stats dynamic shared memory allocator access
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| — | — | ✓ | ✓ | ✓ | ✓ |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:739 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/storage/lmgr/lwlock.c:165. The instrumented operation is: Waiting for stats dynamic shared memory allocator access. LWLockAcquire could not immediately take the lightweight-lock tranche displayed as PgStatsDSA. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:165 —
PgStatsDSA - PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:390 —
PgStatsDSA
Related controls and signals
- GUCs: None directly.
- Metrics: [metric:waiting_sessions] · [metric:wait_event_share]
49 - LWLock: PgStatsData
PgStatsData
VersionsPG 15-18
Evidence3 source location(s)
Official description
Waiting for shared memory stats data access
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| — | — | ✓ | ✓ | ✓ | ✓ |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:739 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/storage/lmgr/lwlock.c:167. The instrumented operation is: Waiting for shared memory stats data access. LWLockAcquire could not immediately take the lightweight-lock tranche displayed as PgStatsData. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:167 —
PgStatsData - PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:392 —
PgStatsData
Related controls and signals
- GUCs: None directly.
- Metrics: [metric:waiting_sessions] · [metric:wait_event_share]
50 - LWLock: PgStatsHash
PgStatsHash
VersionsPG 15-18
Evidence3 source location(s)
Official description
Waiting for stats shared memory hash table access
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| — | — | ✓ | ✓ | ✓ | ✓ |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:739 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/storage/lmgr/lwlock.c:166. The instrumented operation is: Waiting for stats shared memory hash table access. LWLockAcquire could not immediately take the lightweight-lock tranche displayed as PgStatsHash. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:166 —
PgStatsHash - PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:391 —
PgStatsHash
Related controls and signals
- GUCs: None directly.
- Metrics: [metric:waiting_sessions] · [metric:wait_event_share]
51 - LWLock: PredicateLockManager
PredicateLockManager
VersionsPG 13-18
Evidence3 source location(s)
Official description
Waiting to access predicate lock information used by serializable transactions
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:739 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/storage/lmgr/lwlock.c:154. The instrumented operation is: Waiting to access predicate lock information used by serializable transactions. LWLockAcquire could not immediately take the lightweight-lock tranche displayed as PredicateLockManager. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:154 —
PredicateLockManager - PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:379 —
PredicateLockManager
Related controls and signals
- GUCs: None directly.
- Metrics: [metric:waiting_sessions] · [metric:wait_event_share]
52 - LWLock: ProcArray
ProcArray
VersionsPG 13-18
Evidence3 source location(s)
Official description
Waiting to access the shared per-process data structures (typically, to get a snapshot or report a session’s transaction ID)
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Trigger mechanism
ProcArrayLock protects the shared PGPROC/PGXACT arrays used for snapshots, transaction visibility, and transaction end. Snapshot acquisition and updates to process transaction state must briefly coordinate through it.
Normal or trouble?
- Normal: Brief waits are expected on busy OLTP systems that start and finish many transactions.
- Investigate: Persistent contention can accompany extreme connection counts, snapshot-heavy workloads, long transactions, or bursts of transaction completion.
Diagnostic SQL
Response
- Measure active backends and transaction age, not only total connections.
- Find long-running and idle-in-transaction sessions that keep visibility horizons old.
- Pool connections, shorten transactions, and avoid synchronized bursts of tiny transactions.
Source evidence
- PostgreSQL 18.6 · src/backend/access/transam/xlog.c:6121 —
ProcArray - PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:316 —
ProcArray
Related controls and signals
- GUCs: [guc:max_connections] · [guc:idle_in_transaction_session_timeout]
- Metrics: [metric:waiting_sessions] · [metric:wait_event_share] · [metric:active_backends] · [metric:oldest_transaction_age]
Typical incident pattern
An application reconnect storm creates thousands of short transactions while a reporting query holds an old snapshot, amplifying ProcArray traffic.
53 - LWLock: RelCacheInit
RelCacheInit
VersionsPG 13-18
Evidence3 source location(s)
Official description
Waiting to read or update a pg_internal.init relation cache initialization file
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:739 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/utils/activity/wait_event_names.txt:323. The instrumented operation is: Waiting to read or update a pg_internal.init relation cache initialization file. LWLockAcquire could not immediately take the lightweight-lock tranche displayed as RelCacheInit. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:323 —
RelCacheInit - PostgreSQL 18.6 · src/backend/utils/cache/relcache.c:6765 —
RelCacheInit
Related controls and signals
- GUCs: None directly.
- Metrics: [metric:waiting_sessions] · [metric:wait_event_share]
54 - LWLock: RelationMapping
RelationMapping
VersionsPG 13-18
Evidence3 source location(s)
Official description
Waiting to read or update a pg_filenode.map file (used to track the filenode assignments of certain system catalogs)
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:739 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/utils/activity/wait_event_names.txt:332. The instrumented operation is: Waiting to read or update a pg_filenode.map file (used to track the filenode assignments of certain system catalogs). LWLockAcquire could not immediately take the lightweight-lock tranche displayed as RelationMapping. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:332 —
RelationMapping - PostgreSQL 18.6 · src/backend/utils/cache/relmapper.c:311 —
RelationMapping
Related controls and signals
- GUCs: None directly.
- Metrics: [metric:waiting_sessions] · [metric:wait_event_share]
55 - LWLock: ReplicationOrigin
ReplicationOrigin
VersionsPG 13-18
Evidence3 source location(s)
Official description
Waiting to create, drop or use a replication origin
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:739 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/replication/logical/origin.c:377. The instrumented operation is: Waiting to create, drop or use a replication origin. LWLockAcquire could not immediately take the lightweight-lock tranche displayed as ReplicationOrigin. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 18.6 · src/backend/replication/logical/origin.c:377 —
ReplicationOrigin - PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:344 —
ReplicationOrigin
Related controls and signals
- GUCs: None directly.
- Metrics: [metric:waiting_sessions] · [metric:wait_event_share]
56 - LWLock: ReplicationOriginState
ReplicationOriginState
VersionsPG 13-18
Evidence3 source location(s)
Official description
Waiting to read or update the progress of one replication origin
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:739 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/replication/logical/origin.c:557. The instrumented operation is: Waiting to read or update the progress of one replication origin. LWLockAcquire could not immediately take the lightweight-lock tranche displayed as ReplicationOriginState. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 18.6 · src/backend/replication/logical/origin.c:557 —
ReplicationOriginState - PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:374 —
ReplicationOriginState
Related controls and signals
- GUCs: None directly.
- Metrics: [metric:waiting_sessions] · [metric:wait_event_share]
57 - LWLock: ReplicationSlotAllocation
ReplicationSlotAllocation
VersionsPG 13-18
Evidence3 source location(s)
Official description
Waiting to allocate or free a replication slot
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:739 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/replication/logical/slotsync.c:543. The instrumented operation is: Waiting to allocate or free a replication slot. LWLockAcquire could not immediately take the lightweight-lock tranche displayed as ReplicationSlotAllocation. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 18.6 · src/backend/replication/logical/slotsync.c:543 —
ReplicationSlotAllocation - PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:341 —
ReplicationSlotAllocation
Related controls and signals
- GUCs: None directly.
- Metrics: [metric:waiting_sessions] · [metric:wait_event_share]
58 - LWLock: ReplicationSlotControl
ReplicationSlotControl
VersionsPG 13-18
Evidence3 source location(s)
Official description
Waiting to read or update replication slot state
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:739 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/replication/logical/logical.c:492. The instrumented operation is: Waiting to read or update replication slot state. LWLockAcquire could not immediately take the lightweight-lock tranche displayed as ReplicationSlotControl. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 18.6 · src/backend/replication/logical/logical.c:492 —
ReplicationSlotControl - PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:342 —
ReplicationSlotControl
Related controls and signals
- GUCs: None directly.
- Metrics: [metric:waiting_sessions] · [metric:wait_event_share]
59 - LWLock: ReplicationSlotIO
ReplicationSlotIO
VersionsPG 13-18
Evidence3 source location(s)
Official description
Waiting for I/O on a replication slot
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:739 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/storage/lmgr/lwlock.c:150. The instrumented operation is: Waiting for I/O on a replication slot. LWLockAcquire could not immediately take the lightweight-lock tranche displayed as ReplicationSlotIO. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:150 —
ReplicationSlotIO - PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:375 —
ReplicationSlotIO
Related controls and signals
- GUCs: None directly.
- Metrics: [metric:waiting_sessions] · [metric:wait_event_share]
60 - LWLock: SInvalRead
SInvalRead
VersionsPG 13-18
Evidence3 source location(s)
Official description
Waiting to retrieve messages from the shared catalog invalidation queue
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:739 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/storage/ipc/sinvaladt.c:497. The instrumented operation is: Waiting to retrieve messages from the shared catalog invalidation queue. LWLockAcquire could not immediately take the lightweight-lock tranche displayed as SInvalRead. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 18.6 · src/backend/storage/ipc/sinvaladt.c:497 —
SInvalRead - PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:317 —
SInvalRead
Related controls and signals
- GUCs: None directly.
- Metrics: [metric:waiting_sessions] · [metric:wait_event_share]
61 - LWLock: SInvalWrite
SInvalWrite
VersionsPG 13-18
Evidence3 source location(s)
Official description
Waiting to add a message to the shared catalog invalidation queue
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:739 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/storage/ipc/sinvaladt.c:290. The instrumented operation is: Waiting to add a message to the shared catalog invalidation queue. LWLockAcquire could not immediately take the lightweight-lock tranche displayed as SInvalWrite. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 18.6 · src/backend/storage/ipc/sinvaladt.c:290 —
SInvalWrite - PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:318 —
SInvalWrite
Related controls and signals
- GUCs: None directly.
- Metrics: [metric:waiting_sessions] · [metric:wait_event_share]
62 - LWLock: SerialBuffer
SerialBuffer
VersionsPG 13-18
Evidence3 source location(s)
Official description
Waiting for I/O on a serializable transaction conflict SLRU buffer
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:739 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/storage/lmgr/lwlock.c:146. The instrumented operation is: Waiting for I/O on a serializable transaction conflict SLRU buffer. LWLockAcquire could not immediately take the lightweight-lock tranche displayed as SerialBuffer. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:146 —
SerialBuffer - PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:371 —
SerialBuffer
Related controls and signals
- GUCs: None directly.
- Metrics: [metric:waiting_sessions] · [metric:wait_event_share]
63 - LWLock: SerialControl
SerialControl
VersionsPG 17-18
Evidence3 source location(s)
Official description
Waiting to read or update shared pg_serial state
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| — | — | — | — | ✓ | ✓ |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:739 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/storage/lmgr/predicate.c:835. The instrumented operation is: Waiting to read or update shared pg_serial state. LWLockAcquire could not immediately take the lightweight-lock tranche displayed as SerialControl. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/storage/lmgr/predicate.c:835 —
SerialControl - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:354 —
SerialControl
Related controls and signals
- GUCs: None directly.
- Metrics: [metric:waiting_sessions] · [metric:wait_event_share]
64 - LWLock: SerialSLRU
SerialSLRU
VersionsPG 13-18
Evidence3 source location(s)
Official description
Waiting to access the serializable transaction conflict SLRU cache
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:739 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/storage/lmgr/lwlock.c:176. The instrumented operation is: Waiting to access the serializable transaction conflict SLRU cache. LWLockAcquire could not immediately take the lightweight-lock tranche displayed as SerialSLRU. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:176 —
SerialSLRU - PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:401 —
SerialSLRU
Related controls and signals
- GUCs: None directly.
- Metrics: [metric:waiting_sessions] · [metric:wait_event_share]
65 - LWLock: SerializableFinishedList
SerializableFinishedList
VersionsPG 13-18
Evidence3 source location(s)
Official description
Waiting to access the list of finished serializable transactions
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:739 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/storage/lmgr/predicate.c:1507. The instrumented operation is: Waiting to access the list of finished serializable transactions. LWLockAcquire could not immediately take the lightweight-lock tranche displayed as SerializableFinishedList. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/storage/lmgr/predicate.c:1507 —
SerializableFinishedList - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:335 —
SerializableFinishedList
Related controls and signals
- GUCs: None directly.
- Metrics: [metric:waiting_sessions] · [metric:wait_event_share]
66 - LWLock: SerializablePredicateList
SerializablePredicateList
VersionsPG 13-18
Evidence3 source location(s)
Official description
Waiting to access the list of predicate locks held by serializable transactions
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:739 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/storage/lmgr/predicate.c:2220. The instrumented operation is: Waiting to access the list of predicate locks held by serializable transactions. LWLockAcquire could not immediately take the lightweight-lock tranche displayed as SerializablePredicateList. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/storage/lmgr/predicate.c:2220 —
SerializablePredicateList - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:336 —
SerializablePredicateList
Related controls and signals
- GUCs: None directly.
- Metrics: [metric:waiting_sessions] · [metric:wait_event_share]
67 - LWLock: SerializableXactHash
SerializableXactHash
VersionsPG 13-18
Evidence3 source location(s)
Official description
Waiting to read or update information about serializable transactions
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:739 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/storage/lmgr/predicate.c:1462. The instrumented operation is: Waiting to read or update information about serializable transactions. LWLockAcquire could not immediately take the lightweight-lock tranche displayed as SerializableXactHash. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/storage/lmgr/predicate.c:1462 —
SerializableXactHash - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:334 —
SerializableXactHash
Related controls and signals
68 - LWLock: SharedTidBitmap
SharedTidBitmap
VersionsPG 13-18
Evidence3 source location(s)
Official description
Waiting to access a shared TID bitmap during a parallel bitmap index scan
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:739 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/storage/lmgr/lwlock.c:162. The instrumented operation is: Waiting to access a shared TID bitmap during a parallel bitmap index scan. LWLockAcquire could not immediately take the lightweight-lock tranche displayed as SharedTidBitmap. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:162 —
SharedTidBitmap - PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:387 —
SharedTidBitmap
Related controls and signals
- GUCs: None directly.
- Metrics: [metric:waiting_sessions] · [metric:wait_event_share]
69 - LWLock: SharedTupleStore
SharedTupleStore
VersionsPG 13-18
Evidence3 source location(s)
Official description
Waiting to access a shared tuple store during parallel query
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:739 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/storage/lmgr/lwlock.c:161. The instrumented operation is: Waiting to access a shared tuple store during parallel query. LWLockAcquire could not immediately take the lightweight-lock tranche displayed as SharedTupleStore. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:161 —
SharedTupleStore - PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:386 —
SharedTupleStore
Related controls and signals
- GUCs: None directly.
- Metrics: [metric:waiting_sessions] · [metric:wait_event_share]
70 - LWLock: ShmemIndex
ShmemIndex
VersionsPG 13-18
Evidence3 source location(s)
Official description
Waiting to find or allocate space in shared memory
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:739 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/storage/ipc/shmem.c:392. The instrumented operation is: Waiting to find or allocate space in shared memory. LWLockAcquire could not immediately take the lightweight-lock tranche displayed as ShmemIndex. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 18.6 · src/backend/storage/ipc/shmem.c:392 —
ShmemIndex - PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:313 —
ShmemIndex
Related controls and signals
- GUCs: None directly.
- Metrics: [metric:waiting_sessions] · [metric:wait_event_share]
71 - LWLock: SubtransBuffer
SubtransBuffer
VersionsPG 13-18
Evidence3 source location(s)
Official description
Waiting for I/O on a sub-transaction SLRU buffer
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:739 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/storage/lmgr/lwlock.c:142. The instrumented operation is: Waiting for I/O on a sub-transaction SLRU buffer. LWLockAcquire could not immediately take the lightweight-lock tranche displayed as SubtransBuffer. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:142 —
SubtransBuffer - PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:367 —
SubtransBuffer
Related controls and signals
- GUCs: None directly.
- Metrics: [metric:waiting_sessions] · [metric:wait_event_share]
72 - LWLock: SubtransSLRU
SubtransSLRU
VersionsPG 13-18
Evidence3 source location(s)
Official description
Waiting to access the sub-transaction SLRU cache
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:739 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/storage/lmgr/lwlock.c:177. The instrumented operation is: Waiting to access the sub-transaction SLRU cache. LWLockAcquire could not immediately take the lightweight-lock tranche displayed as SubtransSLRU. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:177 —
SubtransSLRU - PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:402 —
SubtransSLRU
Related controls and signals
- GUCs: None directly.
- Metrics: [metric:waiting_sessions] · [metric:wait_event_share]
73 - LWLock: SyncRep
SyncRep
VersionsPG 13-18
Evidence3 source location(s)
Official description
Waiting to read or update information about the state of synchronous replication
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Trigger mechanism
SyncRepLock protects synchronous-replication queues and shared sender state. Committers enqueue or inspect their wait position while WAL senders update which LSNs the configured synchronous standbys have acknowledged.
Normal or trouble?
- Normal: Small bursts occur as synchronous commits queue and WAL senders publish acknowledgements.
- Investigate: Sustained SyncRep LWLock contention is different from waiting for a standby acknowledgement: it means queue/state coordination itself is hot, usually under extreme commit concurrency or sender churn.
Diagnostic SQL
Response
- Separate LWLock/SyncRep from IPC/SyncRep and replication-lag waits.
- Inspect synchronous standby health, sender churn, and commit rate.
- Stabilize replication and smooth commit bursts; change durability policy only with explicit incident authority.
Source evidence
- PostgreSQL 18.6 · src/backend/replication/syncrep.c:192 —
SyncRep - PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:337 —
SyncRep
Related controls and signals
- GUCs: [guc:synchronous_standby_names] · [guc:synchronous_commit] · [guc:wal_sender_timeout]
- Metrics: [metric:waiting_sessions] · [metric:wait_event_share] · [metric:replication_flush_lag] · [metric:commit_latency]
Typical incident pattern
A standby flaps while a burst of synchronous committers repeatedly enters and leaves the wait queue, making queue coordination visible as LWLock/SyncRep.
74 - LWLock: SyncScan
SyncScan
VersionsPG 13-18
Evidence3 source location(s)
Official description
Waiting to select the starting location of a synchronized table scan
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:739 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/access/common/syncscan.c:258. The instrumented operation is: Waiting to select the starting location of a synchronized table scan. LWLockAcquire could not immediately take the lightweight-lock tranche displayed as SyncScan. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 18.6 · src/backend/access/common/syncscan.c:258 —
SyncScan - PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:331 —
SyncScan
Related controls and signals
- GUCs: None directly.
- Metrics: [metric:waiting_sessions] · [metric:wait_event_share]
75 - LWLock: TablespaceCreate
TablespaceCreate
VersionsPG 13-18
Evidence3 source location(s)
Official description
Waiting to create or drop a tablespace
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:739 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/commands/tablespace.c:138. The instrumented operation is: Waiting to create or drop a tablespace. LWLockAcquire could not immediately take the lightweight-lock tranche displayed as TablespaceCreate. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 18.6 · src/backend/commands/tablespace.c:138 —
TablespaceCreate - PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:326 —
TablespaceCreate
Related controls and signals
- GUCs: None directly.
- Metrics: [metric:waiting_sessions] · [metric:wait_event_share]
76 - LWLock: TwoPhaseState
TwoPhaseState
VersionsPG 13-18
Evidence3 source location(s)
Official description
Waiting to read or update the state of prepared transactions
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:739 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/access/transam/twophase.c:329. The instrumented operation is: Waiting to read or update the state of prepared transactions. LWLockAcquire could not immediately take the lightweight-lock tranche displayed as TwoPhaseState. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 18.6 · src/backend/access/transam/twophase.c:329 —
TwoPhaseState - PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:325 —
TwoPhaseState
Related controls and signals
- GUCs: None directly.
- Metrics: [metric:waiting_sessions] · [metric:wait_event_share]
77 - LWLock: WALBufMapping
WALBufMapping
VersionsPG 13-18
Evidence3 source location(s)
Official description
Waiting to replace a page in WAL buffers
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Trigger mechanism
WALBufMappingLock coordinates the mapping between WAL page numbers and the finite wal_buffers slots. A backend needs it when advancing to or replacing a WAL buffer page.
Normal or trouble?
- Normal: Short waits appear as WAL generation advances through buffer pages.
- Investigate: Sustained contention suggests WAL generation is turning over buffers faster than the write path advances, often during write bursts or checkpoints.
Diagnostic SQL
Response
- Correlate with WAL bytes, WAL writes, and checkpoint timing.
- Check whether wal_buffers is repeatedly exhausted during bursts.
- Smooth write bursts and fix WAL device latency before tuning buffer size.
Source evidence
- PostgreSQL 18.6 · src/backend/access/transam/xlog.c:1999 —
WALBufMapping - PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:319 —
WALBufMapping
Related controls and signals
- GUCs: [guc:wal_buffers] · [guc:checkpoint_timeout] · [guc:max_wal_size]
- Metrics: [metric:waiting_sessions] · [metric:wait_event_share] · [metric:wal_bytes] · [metric:wal_write_time]
Typical incident pattern
A bulk load saturates WAL generation while the WAL device stalls, forcing frequent WAL buffer remapping.
78 - LWLock: WALInsert
WALInsert
VersionsPG 13-18
Evidence3 source location(s)
Official description
Waiting to insert WAL data into a memory buffer
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Trigger mechanism
A backend must hold one of the WAL insertion locks while reserving and copying a WAL record into shared WAL buffers. High concurrent WAL producers can queue when insertion critical sections lengthen.
Normal or trouble?
- Normal: Transient waits are normal during concurrent writes and commit bursts.
- Investigate: A recurring foreground pile-up indicates WAL insertion has become a serialization point, often with very high write concurrency, full-page images, or slow buffer turnover.
Diagnostic SQL
Response
- Rank statements by WAL generation and call rate.
- Check checkpoint/full-page-image timing and concurrent writer count.
- Batch tiny writes, reduce needless index churn, and address WAL write latency.
Source evidence
- PostgreSQL 18.6 · src/backend/access/transam/xlog.c:1399 —
WALInsert - PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:372 —
WALInsert
Related controls and signals
- GUCs: [guc:wal_buffers] · [guc:full_page_writes] · [guc:checkpoint_timeout]
- Metrics: [metric:waiting_sessions] · [metric:wait_event_share] · [metric:wal_bytes] · [metric:wal_fpi] · [metric:statement_wal_bytes]
Typical incident pattern
A fan-out job issues many single-row commits immediately after a checkpoint; full-page images and writer concurrency turn WAL insertion into the bottleneck.
79 - LWLock: WALSummarizer
WALSummarizer
VersionsPG 17-18
Evidence3 source location(s)
Official description
Waiting to read or update WAL summarization state
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| — | — | — | — | ✓ | ✓ |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:739 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/postmaster/walsummarizer.c:273. The instrumented operation is: Waiting to read or update WAL summarization state. LWLockAcquire could not immediately take the lightweight-lock tranche displayed as WALSummarizer. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 18.6 · src/backend/postmaster/walsummarizer.c:273 —
WALSummarizer - PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:351 —
WALSummarizer
Related controls and signals
80 - LWLock: WALWrite
WALWrite
VersionsPG 13-18
Evidence3 source location(s)
Official description
Waiting for WAL buffers to be written to disk
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Trigger mechanism
WALWriteLock serializes progress that writes shared WAL buffers and advances the written/flushed WAL positions. A waiter is queued behind the backend currently performing or coordinating that work.
Normal or trouble?
- Normal: Brief waits occur when concurrent committers help write WAL.
- Investigate: Sustained WALWrite with commit latency usually means the WAL write path is slow or cannot absorb the generated WAL rate.
Diagnostic SQL
Response
- Compare WAL write and sync time with commit latency.
- Check the WAL filesystem/device, virtualization throttling, and checkpoint overlap.
- Reduce burstiness; tune wal_writer settings only after storage evidence confirms the path.
Source evidence
- PostgreSQL 18.6 · src/backend/access/transam/xlog.c:2047 —
WALWrite - PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:320 —
WALWrite
Related controls and signals
- GUCs: [guc:wal_writer_delay] · [guc:wal_writer_flush_after] · [guc:synchronous_commit]
- Metrics: [metric:waiting_sessions] · [metric:wait_event_share] · [metric:wal_write_time] · [metric:wal_sync_time] · [metric:commit_latency]
Typical incident pattern
A cloud volume hits its burst-credit ceiling; WAL writes lengthen, committers queue on WALWrite, and synchronous commits slow together.
81 - LWLock: WaitEventCustom
WaitEventCustom
VersionsPG 17-18
Evidence3 source location(s)
Official description
Waiting to read or update custom wait events information
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| — | — | — | — | ✓ | ✓ |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:739 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/utils/activity/wait_event.c:193. The instrumented operation is: Waiting to read or update custom wait events information. LWLockAcquire could not immediately take the lightweight-lock tranche displayed as WaitEventCustom. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event.c:193 —
WaitEventCustom - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:350 —
WaitEventCustom
Related controls and signals
- GUCs: None directly.
- Metrics: [metric:waiting_sessions] · [metric:wait_event_share]
82 - LWLock: WrapLimitsVacuum
WrapLimitsVacuum
VersionsPG 13-18
Evidence3 source location(s)
Official description
Waiting to update limits on transaction id and multixact consumption
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:739 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/commands/vacuum.c:1858. The instrumented operation is: Waiting to update limits on transaction id and multixact consumption. LWLockAcquire could not immediately take the lightweight-lock tranche displayed as WrapLimitsVacuum. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 18.6 · src/backend/commands/vacuum.c:1858 —
WrapLimitsVacuum - PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:348 —
WrapLimitsVacuum
Related controls and signals
83 - LWLock: XactBuffer
XactBuffer
VersionsPG 13-18
Evidence3 source location(s)
Official description
Waiting for I/O on a transaction status SLRU buffer
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:739 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/storage/lmgr/lwlock.c:140. The instrumented operation is: Waiting for I/O on a transaction status SLRU buffer. LWLockAcquire could not immediately take the lightweight-lock tranche displayed as XactBuffer. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:140 —
XactBuffer - PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:365 —
XactBuffer
Related controls and signals
84 - LWLock: XactSLRU
XactSLRU
VersionsPG 13-18
Evidence3 source location(s)
Official description
Waiting to access the transaction status SLRU cache
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Trigger mechanism
The transaction-status SLRU lock protects pg_xact cache metadata and pages while PostgreSQL reads or updates transaction commit status. Visibility checks for uncached or old XIDs can bring this path into the foreground.
Normal or trouble?
- Normal: Short waits accompany transaction completion and occasional pg_xact cache misses.
- Investigate: Persistent waits can indicate transaction-status cache churn, access to very old tuples, or storage latency on the pg_xact path.
Diagnostic SQL
Response
- Check old transactions and vacuum/freeze health.
- Correlate with XactBuffer and pg_xact I/O waits.
- Remove visibility-horizon blockers and restore vacuum progress before changing SLRU-related capacity.
Source evidence
- PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:178 —
XactSLRU - PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:403 —
XactSLRU
Related controls and signals
- GUCs: [guc:autovacuum_freeze_max_age] · [guc:vacuum_freeze_table_age]
- Metrics: [metric:waiting_sessions] · [metric:wait_event_share] · [metric:oldest_transaction_age] · [metric:xact_slru_io]
Typical incident pattern
A long-lived snapshot prevents cleanup while queries revisit cold, old tuple versions, creating pg_xact cache churn and XactSLRU contention.
85 - LWLock: XactTruncation
XactTruncation
VersionsPG 13-18
Evidence3 source location(s)
Official description
Waiting to execute pg_xact_status or update the oldest transaction ID available to it
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:739 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/access/transam/varsup.c:357. The instrumented operation is: Waiting to execute pg_xact_status or update the oldest transaction ID available to it. LWLockAcquire could not immediately take the lightweight-lock tranche displayed as XactTruncation. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 18.6 · src/backend/access/transam/varsup.c:357 —
XactTruncation - PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:347 —
XactTruncation
Related controls and signals
86 - LWLock: XidGen
XidGen
VersionsPG 13-18
Evidence3 source location(s)
Official description
Waiting to allocate a new transaction ID
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Trigger mechanism
pgstat_report_wait_start at src/backend/storage/lmgr/lwlock.c:739 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/access/transam/varsup.c:105. The instrumented operation is: Waiting to allocate a new transaction ID. LWLockAcquire could not immediately take the lightweight-lock tranche displayed as XidGen. The generic LWLock reporter publishes the tranche name while the backend sleeps on the internal shared-memory resource.
Normal or trouble?
- Normal: A brief sample is normal around short internal critical sections.
- Investigate: Investigate when the same tranche affects at least 10% of active foreground sessions in three consecutive one-second samples; treat 25% or waits beyond five seconds as urgent.
Diagnostic SQL
Response
- Repeat the snapshot and isolate one hot tranche.
- Correlate it with the protected resource and current workload phase.
- Reduce the specific contention source; adding concurrency can make a shared-memory hotspot worse.
Source evidence
- PostgreSQL 18.6 · src/backend/access/transam/varsup.c:105 —
XidGen - PostgreSQL 18.6 · src/backend/storage/lmgr/lwlock.c:739 —
pgstat_report_wait_start - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:315 —
XidGen
Related controls and signals
- GUCs: None directly.
- Metrics: [metric:waiting_sessions] · [metric:wait_event_share]