# Postgres Wait Events (Official Reference)
This file represents the official wait event documentation for Postgres 17+.
## Wait Event Types
| Wait Event Type | Description |
| :--- | :--- |
| **Activity** | The server process is idle. |
| **BufferPin** | Waiting for exclusive access to a data buffer. |
| **Client** | Waiting for activity on a socket connected to a user application. |
| **Extension** | Waiting for some condition defined by an extension module. |
| **InjectionPoint** | Waiting for an injection point to reach an outcome defined in a test. |
| **IO** | Waiting for an I/O operation to complete. |
| **IPC** | Waiting for some interaction with another server process. |
| **Lock** | Waiting for a heavyweight lock (SQL-visible objects like tables). |
| **LWLock** | Waiting for a lightweight lock (Shared memory data structures). |
| **Timeout** | Waiting for a timeout to expire. |
## 1. Activity Waits
| Event | Description |
| :--- | :--- |
| ArchiverMain | Waiting in main loop of archiver process. |
| AutovacuumMain | Waiting in main loop of autovacuum launcher process. |
| BgwriterHibernate | Waiting in background writer process, hibernating. |
| BgwriterMain | Waiting in main loop of background writer process. |
| CheckpointerMain | Waiting in main loop of checkpointer process. |
| CheckpointerShutdown | Waiting for checkpointer process to be terminated. |
| IoWorkerMain | Waiting in main loop of IO Worker process. |
| LogicalApplyMain | Waiting in main loop of logical replication apply process. |
| LogicalLauncherMain | Waiting in main loop of logical replication launcher process. |
| LogicalParallelApplyMain | Waiting in main loop of logical replication parallel apply process. |
| RecoveryWalStream | Waiting in main loop of startup process for WAL to arrive. |
| ReplicationSlotsyncMain | Waiting in main loop of slot sync worker. |
| ReplicationSlotsyncShutdown | Waiting for slot sync worker to shut down. |
| SysloggerMain | Waiting in main loop of syslogger process. |
| WalReceiverMain | Waiting in main loop of WAL receiver process. |
| WalSenderMain | Waiting in main loop of WAL sender process. |
| WalSummarizerWal | Waiting in WAL summarizer for more WAL. |
| WalWriterMain | Waiting in main loop of WAL writer process. |
## 2. BufferPin Waits
| Event | Description |
| :--- | :--- |
| BufferPin | Waiting to acquire an exclusive pin on a buffer. |
## 3. Client Waits
| Event | Description |
| :--- | :--- |
| ClientRead | Waiting to read data from the client. |
| ClientWrite | Waiting to write data to the client. |
| GssOpenServer | Waiting while establishing a GSSAPI session. |
| LibpqwalreceiverConnect | Waiting in WAL receiver to establish connection. |
| LibpqwalreceiverReceive | Waiting in WAL receiver to receive data. |
| SslOpenServer | Waiting for SSL connection. |
| WaitForStandbyConfirmation | Waiting for physical standby confirmation. |
| WalSenderWaitForWal | Waiting for WAL to be flushed in WAL sender. |
| WalSenderWriteData | Waiting for activity when processing replies from WAL receiver. |
## 4. IO Waits
| Event | Description |
| :--- | :--- |
| AioIoCompletion | Waiting for another process to complete IO. |
| AioIoUringExecution | Waiting for IO execution via io_uring. |
| AioIoUringSubmit | Waiting for IO submission via io_uring. |
| BasebackupRead | Waiting for base backup to read from a file. |
| BasebackupSync | Waiting for base backup sync. |
| BasebackupWrite | Waiting for base backup write. |
| BuffileRead | Waiting for buffered file read. |
| BuffileTruncate | Waiting for buffered file truncate. |
| BuffileWrite | Waiting for buffered file write. |
| ControlFileRead | Waiting for pg_control read. |
| ControlFileSync | Waiting for pg_control sync. |
| ControlFileSyncUpdate | Waiting for updated pg_control sync. |
| ControlFileWrite | Waiting for pg_control write. |
| ControlFileWriteUpdate | Waiting for updated pg_control write. |
| CopyFileCopy | Waiting for a file copy operation. |
| CopyFileRead | Waiting for a read during file copy. |
| CopyFileWrite | Waiting for a write during file copy. |
| DataFileExtend | Waiting for data file extension. |
| DataFileFlush | Waiting for data file flush. |
| DataFileImmediateSync | Waiting for immediate data file sync. |
| DataFilePrefetch | Waiting for asynchronous prefetch. |
| DataFileRead | Waiting for a read from data file. |
| DataFileSync | Waiting for data file sync. |
| DataFileTruncate | Waiting for data file truncate. |
| DataFileWrite | Waiting for data file write. |
| DsmAllocate | Waiting for dynamic shared memory allocation. |
| DsmFillZeroWrite | Waiting to fill DSM segment with zeroes. |
| LockFileAddtodatadirRead | Waiting for read while adding line to lock file. |
| LockFileAddtodatadirSync | Waiting for sync while adding line to lock file. |
| LockFileAddtodatadirWrite | Waiting for write while adding line to lock file. |
| LockFileCreateRead | Waiting for read while creating lock file. |
| LockFileCreateSync | Waiting for sync while creating lock file. |
| LockFileCreateWrite | Waiting for write while creating lock file. |
| LockFileRecheckdatadirRead | Waiting for read during lock file recheck. |
| LogicalRewriteCheckpointSync | Waiting for logical rewrite mapping sync during checkpoint. |
| LogicalRewriteMappingSync | Waiting for logical rewrite mapping sync. |
| LogicalRewriteMappingWrite | Waiting for logical rewrite mapping write. |
| LogicalRewriteSync | Waiting for logical rewrite sync. |
| LogicalRewriteTruncate | Waiting for logical rewrite truncate. |
| LogicalRewriteWrite | Waiting for logical rewrite write. |
| RelationMapRead | Waiting for relation map file read. |
| RelationMapReplace | Waiting for relation map file replacement. |
| RelationMapWrite | Waiting for relation map file write. |
| ReorderBufferRead | Waiting for read during reorder buffer management. |
| ReorderBufferWrite | Waiting for write during reorder buffer management. |
| ReorderLogicalMappingRead | Waiting for logical mapping read. |
| ReplicationSlotRead | Waiting for replication slot control file read. |
| ReplicationSlotRestoreSync | Waiting for replication slot restore sync. |
| ReplicationSlotSync | Waiting for replication slot sync. |
| ReplicationSlotWrite | Waiting for replication slot write. |
| SlruFlushSync | Waiting for SLRU flush sync. |
| SlruRead | Waiting for SLRU page read. |
| SlruSync | Waiting for SLRU sync. |
| SlruWrite | Waiting for SLRU page write. |
| SnapbuildRead | Waiting for Snapbuild read. |
| SnapbuildSync | Waiting for Snapbuild sync. |
| SnapbuildWrite | Waiting for Snapbuild write. |
| TimelineHistoryFileSync | Waiting for timeline history file sync. |
| TimelineHistoryFileWrite | Waiting for timeline history file write. |
| TimelineHistoryRead | Waiting for timeline history file read. |
| TimelineHistorySync | Waiting for timeline history sync. |
| TimelineHistoryWrite | Waiting for timeline history write. |
| TwophaseFileRead | Waiting for two-phase state file read. |
| TwophaseFileSync | Waiting for two-phase state file sync. |
| TwophaseFileWrite | Waiting for two-phase state file write. |
| VersionFileSync | Waiting for version file sync. |
| VersionFileWrite | Waiting for version file write. |
| WalsenderTimelineHistoryRead | Waiting for timeline history read in WAL sender. |
| WalBootstrapSync | Waiting for WAL sync during bootstrap. |
| WalBootstrapWrite | Waiting for WAL write during bootstrap. |
| WalCopyRead | Waiting for WAL copy read. |
| WalCopySync | Waiting for WAL copy sync. |
| WalCopyWrite | Waiting for WAL copy write. |
| WalInitSync | Waiting for WAL init sync. |
| WalInitWrite | Waiting for WAL init write. |
| WalRead | Waiting for WAL file read. |
| WalSummaryRead | Waiting for WAL summary file read. |
| WalSummaryWrite | Waiting for WAL summary file write. |
| WalSync | Waiting for WAL file sync. |
| WalSyncMethodAssign | Waiting for WAL sync method assignment. |
| WalWrite | Waiting for WAL file write. |
## 5. IPC Waits
| Event | Description |
| :--- | :--- |
| AppendReady | Waiting for subplan nodes of Append to be ready. |
| ArchiveCleanupCommand | Waiting for archive_cleanup_command. |
| ArchiveCommand | Waiting for archive_command. |
| BackendTermination | Waiting for termination of another backend. |
| BackupWaitWalArchive | Waiting for WAL files for backup to be archived. |
| BgworkerShutdown | Waiting for background worker shutdown. |
| BgworkerStartup | Waiting for background worker startup. |
| BtreePage | Waiting for parallel B-tree scan page. |
| BufferIo | Waiting for buffer IO to complete. |
| CheckpointDelayComplete | Waiting for backend blocking checkpoint completion. |
| CheckpointDelayStart | Waiting for backend blocking checkpoint start. |
| CheckpointDone | Waiting for checkpoint completion. |
| CheckpointStart | Waiting for checkpoint start. |
| ExecuteGather | Waiting for child activity during Gather. |
| HashBatchAllocate | Waiting for Parallel Hash table allocation. |
| HashBatchElect | Electing Parallel Hash participant for allocation. |
| HashBatchLoad | Finishing Hash table load. |
| HashBuildAllocate | Initial hash table allocation. |
| HashBuildElect | Initial hash table election. |
| HashBuildHashInner | Parallel Hash inner relation hashing. |
| HashBuildHashOuter | Parallel Hash outer relation partitioning. |
| HashGrowBatchesDecide | Future batch growth decision. |
| HashGrowBatchesElect | Parallel Hash batch growth election. |
| HashGrowBatchesFinish | Parallel Hash batch growth finish. |
| HashGrowBatchesReallocate | Parallel Hash batch growth re-allocation. |
| HashGrowBatchesRepartition | Parallel Hash repartitioning. |
| HashGrowBucketsElect | Parallel Hash bucket growth election. |
| HashGrowBucketsReallocate | Parallel Hash bucket growth re-allocation. |
| HashGrowBucketsReinsert | Parallel Hash bucket growth re-insertion. |
| LogicalApplySendData | Logical replication data sending. |
| LogicalParallelApplyStateChange | Parallel apply state change. |
| LogicalSyncData | Logical replication initial sync. |
| LogicalSyncStateChange | Logical replication state change. |
| MessageQueueInternal | Message queue worker attachment. |
| MessageQueuePutMessage | Writing to message queue. |
| MessageQueueReceive | Receiving from message queue. |
| MessageQueueSend | Sending to message queue. |
| MultixactCreation | Waiting for multixact creation. |
| ParallelBitmapScan | Parallel bitmap scan initialization. |
| ParallelCreateIndexScan | Parallel CREATE INDEX heap scan. |
| ParallelFinish | Parallel worker completion. |
| ProcarrayGroupUpdate | Group leader clearing XID. |
| ProcSignalBarrier | Barrier event processing. |
| Promote | Standby promotion. |
| RecoveryConflictSnapshot | Conflict resolution for vacuum cleanup. |
| RecoveryConflictTablespace | Conflict resolution for tablespace drop. |
| RecoveryEndCommand | recovery_end_command completion. |
| RecoveryPause | Waiting for recovery resumption. |
| ReplicationOriginDrop | Replication origin drop coordination. |
| ReplicationSlotDrop | Replication slot drop coordination. |
| RestoreCommand | restore_command completion. |
| SafeSnapshot | Waiting for valid snapshot for READ ONLY DEFERRABLE. |
| SyncRep | Synchronous replication confirmation. |
| WalReceiverExit | WAL receiver exit synchronization. |
| WalReceiverWaitStart | Startup process streaming replication start. |
| WalSummaryReady | Waiting for WAL summary generation. |
| XactGroupUpdate | Group leader status update. |
## 6. Lock Waits
| Event | Description |
| :--- | :--- |
| advisory | Advisory user lock. |
| applytransaction | Subscriber remote transaction lock. |
| extend | Relation extension. |
| frozenid | Frozen XID update. |
| object | Non-relation database object lock. |
| page | Page-level relation lock. |
| relation | Relation-level lock (Tables, indices). |
| spectoken | Speculative insertion lock. |
| transactionid | Transaction completion. |
| tuple | Tuple-level lock. |
| userlock | Generic user lock. |
| virtualxid | Virtual transaction ID lock. |
## 7. LWLock Waits
| Event | Description |
| :--- | :--- |
| AddinShmemInit | Extension space allocation. |
| AioUringCompletion | AIO completion via io_uring. |
| AioWorkerSubmissionQueue | AIO worker submission queue access. |
| AutoFile | postgresql.auto.conf update. |
| Autovacuum | Autovacuum worker state. |
| AutovacuumSchedule | Table vacuuming necessity check. |
| BackgroundWorker | Background worker state. |
| BtreeVacuum | B-tree index vacuum state. |
| BufferContent | Data page access in memory. |
| BufferMapping | Block-to-buffer association. |
| CheckpointerComm | Fsync request management. |
| CommitTs | Commit timestamp update. |
| CommitTsBuffer | Commit timestamp SLRU buffer I/O. |
| CommitTsSLRU | Commit timestamp SLRU cache access. |
| ControlFile | pg_control or new WAL file management. |
| DSMRegistry | DSM registry access. |
| DSMRegistryDSA | DSM registry allocator access. |
| DSMRegistryHash | DSM registry shared hash access. |
| DynamicSharedMemoryControl | DSM allocation state. |
| InjectionPoint | Injection point state. |
| LockFastPath | Fast-path lock info. |
| LockManager | Heavyweight lock information. |
| LogicalRepLauncherDSA | Logical launcher DSM allocator. |
| LogicalRepLauncherHash | Logical launcher shared hash. |
| LogicalRepWorker | Logical replication worker state. |
| MultiXactGen | Shared multixact state. |
| MultiXactMemberBuffer | Multixact member SLRU buffer I/O. |
| MultiXactMemberSLRU | Multixact member SLRU cache access. |
| MultiXactOffsetBuffer | Multixact offset SLRU buffer I/O. |
| MultiXactOffsetSLRU | Multixact offset SLRU cache access. |
| MultiXactTruncation | Multixact truncation/management. |
| NotifyBuffer | NOTIFY message SLRU buffer I/O. |
| NotifyQueue | NOTIFY message access. |
| NotifyQueueTail | NOTIFY storage limit update. |
| NotifySLRU | NOTIFY message SLRU cache access. |
| OidGen | OID allocation. |
| ParallelAppend | Subplan choice during parallel append. |
| ParallelBtreeScan | Worker synchronization during parallel b-tree scan. |
| ParallelHashJoin | Worker synchronization during parallel hash join. |
| ParallelQueryDSA | Parallel query DSM allocation. |
| ParallelVacuumDSA | Parallel vacuum DSM allocation. |
| PerSessionDSA | Parallel query DSM allocation per session. |
| PerSessionRecordType | Parallel query composite types. |
| PerSessionRecordTypmod | Parallel query type modifiers. |
| PerXactPredicateList |Serializable transaction predicate list for parallel query. |
| PgStatsData | Shared stats data access. |
| PgStatsDSA | Stats DSM allocator access. |
| PgStatsHash | Stats shared hash access. |
| PredicateLockManager | Serializable predicate lock info. |
| ProcArray | Shared per-process structures (snapshots/XIDs). |
| RelationMapping | pg_filenode.map access. |
| RelCacheInit | pg_internal.init relation cache. |
| ReplicationOrigin | Replication origin lifecycle. |
| ReplicationOriginState | Replication origin progress. |
| ReplicationSlotAllocation | Replication slot allocation. |
| ReplicationSlotControl | Replication slot state. |
| ReplicationSlotIO | Replication slot I/O. |
| SerialBuffer | Conflict SLRU buffer I/O. |
| SerialControl | shared pg_serial state. |
| SerializableFinishedList | Finished serializable transaksi list. |
| SerializablePredicateList | Serializable predicate locks. |
| SerializableXactHash | Serializable transaction info. |
| SerialSLRU | Conflict SLRU cache access. |
| SharedTidBitmap | Shared TID bitmap access. |
| SharedTupleStore | Shared tuple store access. |
| ShmemIndex | Shared memory space allocation. |
| SInvalRead | Shared catalog invalidation queue reads. |
| SInvalWrite | Shared catalog invalidation queue writes. |
| SubtransBuffer | Sub-transaction SLRU buffer I/O. |
| SubtransSLRU | Sub-transaction SLRU cache access. |
| SyncRep | Synchronous replication state. |
| SyncScan | Synchronized table scan location. |
| TablespaceCreate | Tablespace creation/drop. |
| TwoPhaseState | Prepared transaction state. |
| WaitEventCustom | Custom wait events state. |
| WALBufMapping | WAL buffer page replacement. |
| WALInsert | WAL data insertion. |
| WALSummarizer | WAL summarization state. |
| WALWrite | WAL buffer write to disk. |
| WrapLimitsVacuum | Transaction ID/Multixact limits update. |
| XactBuffer | Transaction status SLRU buffer I/O. |
| XactSLRU | Transaction status SLRU cache access. |
| XactTruncation | pg_xact_status update. |
| XidGen | Transaction ID allocation. |
## 8. Timeout Waits
| Event | Description |
| :--- | :--- |
| BaseBackupThrottle | Base backup throttling. |
| CheckpointWriteDelay | Writes delay during checkpoint. |
| PgSleep | pg_sleep call. |
| RecoveryApplyDelay | Recovery WAL application delay. |
| RecoveryRetrieveRetryInterval | Recovery WAL retrieval retry. |
| RegisterSyncRequest | Checkpointer request queue synchronization. |
| SpinDelay | Contended spinlock wait. |
| VacuumDelay | Cost-based vacuum delay. |
| VacuumTruncate | Vacuum table truncation. |
| WalSummarizerError | Post-WAL summarizer error delay. |