pgsql.cc 提供对 postgresql.org 官网内容的中文翻译,由 Pigsty 团队维护。
相对 PostgreSQL 12 的差异:222 个等待事件。
这一版有 126 个事件发生变动,涉及 8 类;PostgreSQL 13 合计 222 个等待事件。更名与类型变动按上一版的身份对上,机械对不上的会如实显示为一次移除加一次新增。
等待备份所需的 WAL 文件成功归档。
等待所有后端处理完 barrier 事件。
等待解决与 vacuum cleanup 有关的恢复冲突。
等待解决与删除表空间有关的恢复冲突。
等待恢复操作继续执行。
PerSessionDSA轻量级锁
等待并行查询的动态共享内存分配。
等待访问并行查询的复合类型信息。
等待访问并行查询中用于标识匿名 record 类型的类型修饰符信息。
SharedTupleStore轻量级锁
并行查询期间,等待访问共享 tuple store。
RecoveryRetrieveRetryInterval超时
恢复期间,当所有来源(pg_wal、归档或流式传输)均无 WAL 数据可用时等待。
在基于成本的 vacuum 延迟点等待。
RecoveryWalAll空闲等待
在恢复期间等待来自流的 WAL。
等待缓冲区 I/O 完成。
Hash/Batch/AllocatingHashBatchAllocate进程间
等待被选出的 Parallel Hash 参与者分配哈希表。
Hash/Batch/ElectingHashBatchElect进程间
等待选出一个负责分配哈希表的 Parallel Hash 参与者。
Hash/Batch/LoadingHashBatchLoad进程间
等待其他 Parallel Hash 参与者完成哈希表加载。
Hash/Build/AllocatingHashBuildAllocate进程间
等待被选出的 Parallel Hash 参与者分配初始哈希表。
Hash/Build/ElectingHashBuildElect进程间
等待选出一个负责分配初始哈希表的 Parallel Hash 参与者。
Hash/Build/HashingInnerHashBuildHashInner进程间
等待其他 Parallel Hash 参与者完成对 inner relation 的哈希处理。
Hash/Build/HashingOuterHashBuildHashOuter进程间
等待其他 Parallel Hash 参与者完成对 outer relation 的分区。
Hash/GrowBatches/DecidingHashGrowBatchesDecide进程间
等待选出一个 Parallel Hash 参与者,以决定后续 batch 扩容。
Hash/GrowBatches/ElectingHashGrowBatchesElect进程间
等待选出一个负责分配更多 batch 的 Parallel Hash 参与者。
Hash/GrowBatches/FinishingHashGrowBatchesFinish进程间
等待被选出的 Parallel Hash 参与者决定后续 batch 扩容。
Hash/GrowBatches/AllocatingHashGrowBatchesAllocate进程间
等待被选出的 Parallel Hash 参与者分配更多 batch。
Hash/GrowBatches/RepartitioningHashGrowBatchesRepartition进程间
等待其他 Parallel Hash 参与者完成重新分区。
Hash/GrowBuckets/ElectingHashGrowBucketsElect进程间
等待选出一个负责分配更多 bucket 的 Parallel Hash 参与者。
Hash/GrowBuckets/AllocatingHashGrowBucketsAllocate进程间
等待被选出的 Parallel Hash 参与者完成更多 bucket 的分配。
Hash/GrowBuckets/ReinsertingHashGrowBucketsReinsert进程间
等待其他 Parallel Hash 参与者完成将元组插入新 bucket。
ClogGroupUpdateXactGroupUpdate进程间
等待 group leader 在事务结束时更新事务状态。
speculative tokenspectoken重量级锁
等待获取推测式插入锁。
AddinShmemInitLockAddinShmemInit轻量级锁
等待管理扩展在共享内存中的空间分配。
等待更新 postgresql.auto.conf 文件。
等待读取或更新 autovacuum worker 的当前状态。
AutovacuumScheduleLockAutovacuumSchedule轻量级锁
等待确认被选中进行 autovacuum 的表仍需要 vacuum。
BackgroundWorkerLockBackgroundWorker轻量级锁
等待读取或更新后台 worker 的状态。
BtreeVacuumLockBtreeVacuum轻量级锁
等待读取或更新 B-tree 索引中与 vacuum 相关的信息。
buffer_contentBufferContent轻量级锁
等待访问内存中的数据页。
buffer_mappingBufferMapping轻量级锁
等待将数据块关联到 buffer pool 中的 buffer。
等待开始执行检查点。
CheckpointerCommLockCheckpointerComm轻量级锁
等待管理 fsync 请求。
等待读取或更新事务提交时间戳的最近设定值。
commit_timestampCommitTsBuffer轻量级锁
等待事务提交时间戳 SLRU buffer 上的 I/O。
CommitTsControlLockCommitTsSLRU轻量级锁
等待访问事务提交时间戳 SLRU 缓存。
ControlFileLockControlFile轻量级锁
等待读取或更新 pg_control 文件,或创建新的 WAL 文件。
DynamicSharedMemoryControlLockDynamicSharedMemoryControl轻量级锁
等待读取或更新动态共享内存分配信息。
procLockFastPath轻量级锁
等待读取或更新进程的快速路径锁信息。
等待读取或更新“重量级”锁的信息。
LogicalRepWorkerLockLogicalRepWorker轻量级锁
等待读取或更新逻辑复制 worker 的状态。
MultiXactGenLockMultiXactGen轻量级锁
等待读取或更新共享 multixact 状态。
multixact_memberMultiXactMemberBuffer轻量级锁
等待 multixact member SLRU buffer 上的 I/O。
MultiXactMemberControlLockMultiXactMemberSLRU轻量级锁
等待访问 multixact member SLRU 缓存。
multixact_offsetMultiXactOffsetBuffer轻量级锁
等待 multixact offset SLRU buffer 上的 I/O。
MultiXactOffsetControlLockMultiXactOffsetSLRU轻量级锁
等待访问 multixact offset SLRU 缓存。
MultiXactTruncationLockMultiXactTruncation轻量级锁
等待读取或截断 multixact 信息。
等待 NOTIFY 消息 SLRU buffer 上的 I/O。
等待读取或更新 NOTIFY 消息。
NotifyQueueTailLockNotifyQueueTail轻量级锁
等待更新 NOTIFY 消息的存储上限。
等待访问 NOTIFY 消息 SLRU 缓存。
OidGenLockOidGen轻量级锁
等待分配新的 OID。
OldSnapshotTimeMapLockOldSnapshotTimeMap轻量级锁
等待读取或更新旧快照控制信息。
parallel_appendParallelAppend轻量级锁
执行 Parallel Append 计划期间,等待选择下一个子计划。
parallel_hash_joinParallelHashJoin轻量级锁
执行 Parallel Hash Join 计划期间,等待同步 worker。
parallel_query_dsaParallelQueryDSA轻量级锁
等待并行查询的动态共享内存分配。
serializable_xactPerXactPredicateList轻量级锁
并行查询期间,等待访问当前可串行化事务所持有的谓词锁列表。
predicate_lock_managerPredicateLockManager轻量级锁
等待访问可串行化事务使用的谓词锁信息。
等待访问共享的进程级数据结构(通常用于获取快照或报告会话的事务 ID)。
RelationMappingLockRelationMapping轻量级锁
等待读取或更新 pg_filenode.map 文件(用于跟踪某些系统目录的 filenode 分配)。
RelCacheInitLockRelCacheInit轻量级锁
等待读取或更新 pg_internal.init relation cache 初始化文件。
ReplicationOriginLockReplicationOrigin轻量级锁
等待创建、删除或使用复制源。
replication_originReplicationOriginState轻量级锁
等待读取或更新一个复制源的进度。
ReplicationSlotAllocationLockReplicationSlotAllocation轻量级锁
等待分配或释放复制槽。
ReplicationSlotControlLockReplicationSlotControl轻量级锁
等待读取或更新复制槽状态。
replication_slot_ioReplicationSlotIO轻量级锁
等待复制槽上的 I/O。
等待可串行化事务冲突 SLRU buffer 上的 I/O。
SerializableFinishedListLockSerializableFinishedList轻量级锁
等待访问已结束的可串行化事务列表。
SerializablePredicateLockListLockSerializablePredicateList轻量级锁
等待访问可串行化事务所持有的谓词锁列表。
SerializableXactHashLockSerializableXactHash轻量级锁
等待读取或更新可串行化事务的信息。
等待访问可串行化事务冲突 SLRU 缓存。
并行 bitmap index scan 期间,等待访问共享 TID bitmap。
等待在共享内存中查找或分配空间。
等待从共享系统目录失效队列中取出消息。
SInvalWriteLockSInvalWrite轻量级锁
等待向共享系统目录失效队列中添加消息。
等待子事务 SLRU buffer 上的 I/O。
SubtransControlLockSubtransSLRU轻量级锁
等待访问子事务 SLRU 缓存。
等待读取或更新同步复制状态信息。
等待选择同步表扫描的起始位置。
TablespaceCreateLockTablespaceCreate轻量级锁
等待创建或删除表空间。
TwoPhaseStateLockTwoPhaseState轻量级锁
等待读取或更新预备事务的状态。
WALBufMappingLockWALBufMapping轻量级锁
等待替换 WAL buffer 中的页面。
等待将 WAL 数据插入内存 buffer。
等待将 WAL buffer 写入磁盘。
WrapLimitsVacuumLockWrapLimitsVacuum轻量级锁
等待更新事务 ID 和 multixact 的消耗上限。
clogXactBuffer轻量级锁
等待事务状态 SLRU buffer 上的 I/O。
等待访问事务状态 SLRU 缓存。
CLogTruncationLockXactTruncation轻量级锁
等待执行 pg_xact_status,或更新当前进程可用的最旧事务 ID。
XidGenLockXidGen轻量级锁
等待分配新的事务 ID。
这一版没有事件改变类型。
ArchiverMain空闲等待
Waiting in main loop of the archiver process.Waiting in main loop of archiver process.
BgwriterMain空闲等待
Waiting in main loop of background writer process background worker.Waiting in main loop of background writer process.
LogicalApplyMain空闲等待
Waiting in main loop of logical apply process.Waiting in main loop of logical replication apply process.
Waiting in main loop of logical launcher process.Waiting in main loop of logical replication launcher process.
PgStatMain空闲等待
Waiting in main loop of the statistics collector process.Waiting in main loop of statistics collector process.
Waiting when WAL data is not available from any kind of sources (local, archive or stream) before trying again to retrieve WAL data, at recovery.Waiting in main loop of startup process for WAL to arrive, during streaming recovery.
BufferPin缓冲区
Waiting to acquire a pin on a buffer.Waiting to acquire an exclusive pin on a buffer.
Waiting to read data from the client while establishing the GSSAPI session.Waiting to read data from the client while establishing a GSSAPI session.
ControlFileRead文件 I/O
Waiting for a read from the control file.Waiting for a read from the pg_control file.
ControlFileSync文件 I/O
Waiting for the control file to reach durable storage.Waiting for the pg_control file to reach durable storage.
ControlFileSyncUpdate文件 I/O
Waiting for an update to the control file to reach durable storage.Waiting for an update to the pg_control file to reach durable storage.
ControlFileWrite文件 I/O
Waiting for a write to the control file.Waiting for a write to the pg_control file.
ControlFileWriteUpdate文件 I/O
Waiting for a write to update the control file.Waiting for a write to update the pg_control file.
DsmFillZeroWrite文件 I/O
Waiting to write zero bytes to a dynamic shared memory backing file.Waiting to fill a dynamic shared memory backing file with zeroes.
WalCopySync文件 I/O
Waiting a new WAL segment created by copying an existing one to reach durable storage.Waiting for a new WAL segment created by copying an existing one to reach durable storage.
WalsenderTimelineHistoryRead文件 I/O
Waiting for a read from a timeline history file during walsender timeline command.Waiting for a read from a timeline history file during a walsender timeline command.
WalSyncMethodAssign文件 I/O
Waiting for data to reach durable storage while assigning WAL sync method.Waiting for data to reach durable storage while assigning a new WAL sync method.
Waiting for activity from child process when executing Gather node.Waiting for activity from a child process while executing a Gather plan node.
Electing a Parallel Hash participant to allocate a hash table.Waiting to elect a Parallel Hash participant to allocate a hash table.
Electing a Parallel Hash participant to allocate the initial hash table.Waiting to elect a Parallel Hash participant to allocate the initial hash table.
Electing a Parallel Hash participant to decide on future batch growth.Waiting to elect a Parallel Hash participant to decide on future batch growth.
Electing a Parallel Hash participant to allocate more batches.Waiting to elect a Parallel Hash participant to allocate more batches.
Waiting for other Parallel Hash participants to finishing repartitioning.Waiting for other Parallel Hash participants to finish repartitioning.
Electing a Parallel Hash participant to allocate more buckets.Waiting to elect a Parallel Hash participant to allocate more buckets.
Waiting for logical replication remote server to send data for initial table synchronization.Waiting for a logical replication remote server to send data for initial table synchronization.
Waiting for logical replication remote server to change state.Waiting for a logical replication remote server to change state.
Waiting for other process to be attached in shared message queue.Waiting for another process to be attached to a shared message queue.
Waiting for group leader to clear transaction id at transaction end.Waiting for the group leader to clear the transaction ID at transaction end.
Waiting for a replication origin to become inactive to be dropped.Waiting for a replication origin to become inactive so it can be dropped.
Waiting for a replication slot to become inactive to be dropped.Waiting for a replication slot to become inactive so it can be dropped.
SafeSnapshot进程间
Waiting for a snapshot for a READ ONLY DEFERRABLE transaction.Waiting to obtain a valid snapshot for a READ ONLY DEFERRABLE transaction.
SyncRep进程间
Waiting for confirmation from remote server during synchronous replication.Waiting for confirmation from a remote server during synchronous replication.
Waiting for group leader to update transaction status at transaction end.Waiting for the group leader to update transaction status at transaction end.
page重量级锁
Waiting to acquire a lock on page of a relation.Waiting to acquire a lock on a page of a relation.
virtualxid重量级锁
Waiting to acquire a virtual xid lock.Waiting to acquire a virtual transaction ID lock.
AddinShmemInit轻量级锁
Waiting to manage space allocation in shared memory.Waiting to manage an extension's space allocation in shared memory.
Autovacuum轻量级锁
Autovacuum worker or launcher waiting to update or read the current state of autovacuum workers.Waiting to read or update the current state of autovacuum workers.
Waiting to ensure that the table it has selected for a vacuum still needs vacuuming.Waiting to ensure that a table selected for autovacuum still needs vacuuming.
BufferContent轻量级锁
Waiting to read or write a data page in memory.Waiting to access a data page in memory.
Checkpoint轻量级锁
Waiting to perform checkpoint.Waiting to begin a checkpoint.
CommitTs轻量级锁
Waiting to read or update the last value set for the transaction timestamp.Waiting to read or update the last value set for a transaction commit timestamp.
CommitTsBuffer轻量级锁
Waiting for I/O on commit timestamp buffer.Waiting for I/O on a commit timestamp SLRU buffer.
CommitTsSLRU轻量级锁
Waiting to read or update transaction commit timestamps.Waiting to access the commit timestamp SLRU cache.
ControlFile轻量级锁
Waiting to read or update the control file or creation of a new WAL file.Waiting to read or update the pg_control file or create a new WAL file.
DynamicSharedMemoryControl轻量级锁
Waiting to read or update dynamic shared memory state.Waiting to read or update dynamic shared memory allocation information.
LockFastPath轻量级锁
Waiting to read or update the fast-path lock information.Waiting to read or update a process' fast-path lock information.
LockManager轻量级锁
Waiting to add or examine locks for backends, or waiting to join or exit a locking group (used by parallel query).Waiting to read or update information about “heavyweight” locks.
LogicalRepWorker轻量级锁
Waiting for action on logical replication worker to finish.Waiting to read or update the state of logical replication workers.
Waiting for I/O on a multixact_member buffer.Waiting for I/O on a multixact member SLRU buffer.
Waiting to read or update multixact member mappings.Waiting to access the multixact member SLRU cache.
Waiting for I/O on a multixact offset buffer.Waiting for I/O on a multixact offset SLRU buffer.
Waiting to read or update multixact offset mappings.Waiting to access the multixact offset SLRU cache.
NotifyBuffer轻量级锁
Waiting for I/O on an async (notify) buffer.Waiting for I/O on a NOTIFY message SLRU buffer.
NotifyQueue轻量级锁
Waiting to read or update notification messages.Waiting to read or update NOTIFY messages.
NotifyQueueTail轻量级锁
Waiting to update limit on notification message storage.Waiting to update limit on NOTIFY message storage.
NotifySLRU轻量级锁
Waiting to read or update shared notification state.Waiting to access the NOTIFY message SLRU cache.
OidGen轻量级锁
Waiting to allocate or assign an OID.Waiting to allocate a new OID.
ParallelHashJoin轻量级锁
Waiting to allocate or exchange a chunk of memory or update counters during Parallel Hash plan execution.Waiting to synchronize workers during Parallel Hash Join plan execution.
ParallelQueryDSA轻量级锁
Waiting for parallel query dynamic shared memory allocation lock.Waiting for parallel query dynamic shared memory allocation.
Waiting to perform an operation on a serializable transaction in a parallel query.Waiting to access the list of predicate locks held by the current serializable transaction during a parallel query.
Waiting to add or examine predicate lock information.Waiting to access predicate lock information used by serializable transactions.
ProcArray轻量级锁
Waiting to get a snapshot or clearing a transaction id at transaction end.Waiting to access the shared per-process data structures (typically, to get a snapshot or report a session's transaction ID).
RelationMapping轻量级锁
Waiting to update the relation map file used to store catalog to filenode mapping.Waiting to read or update a pg_filenode.map file (used to track the filenode assignments of certain system catalogs).
RelCacheInit轻量级锁
Waiting to read or write relation cache initialization file.Waiting to read or update a pg_internal.init relation cache initialization file.
Waiting to setup, drop or use replication origin.Waiting to create, drop or use a replication origin.
Waiting to read or update the replication progress.Waiting to read or update the progress of one replication origin.
SerialBuffer轻量级锁
Waiting for I/O on an oldserxid buffer.Waiting for I/O on a serializable transaction conflict SLRU buffer.
Waiting to perform an operation on a list of locks held by serializable transactions.Waiting to access the list of predicate locks held by serializable transactions.
Waiting to retrieve or store information about serializable transactions.Waiting to read or update information about serializable transactions.
SerialSLRU轻量级锁
Waiting to read or record conflicting serializable transactions.Waiting to access the serializable transaction conflict SLRU cache.
SharedTidBitmap轻量级锁
Waiting for TBM shared iterator lock.Waiting to access a shared TID bitmap during a parallel bitmap index scan.
SInvalRead轻量级锁
Waiting to retrieve or remove messages from shared invalidation queue.Waiting to retrieve messages from the shared catalog invalidation queue.
SInvalWrite轻量级锁
Waiting to add a message in shared invalidation queue.Waiting to add a message to the shared catalog invalidation queue.
SubtransBuffer轻量级锁
Waiting for I/O a subtransaction buffer.Waiting for I/O on a sub-transaction SLRU buffer.
SubtransSLRU轻量级锁
Waiting to read or update sub-transaction information.Waiting to access the sub-transaction SLRU cache.
SyncRep轻量级锁
Waiting to read or update information about synchronous replicas.Waiting to read or update information about the state of synchronous replication.
SyncScan轻量级锁
Waiting to get the start location of a scan on a table for synchronized scans.Waiting to select the starting location of a synchronized table scan.
TablespaceCreate轻量级锁
Waiting to create or drop the tablespace.Waiting to create or drop a tablespace.
WALInsert轻量级锁
Waiting to insert WAL into a memory buffer.Waiting to insert WAL data into a memory buffer.
XactBuffer轻量级锁
Waiting for I/O on a clog (transaction status) buffer.Waiting for I/O on a transaction status SLRU buffer.
XactSLRU轻量级锁
Waiting to read or update transaction status.Waiting to access the transaction status SLRU cache.
XactTruncation轻量级锁
Waiting to execute txid_status or update the oldest transaction id available to it.Waiting to execute pg_xact_status or update the oldest transaction ID available to it.
XidGen轻量级锁
Waiting to allocate or assign a transaction id.Waiting to allocate a new transaction ID.
PgSleep超时
Waiting in process that called pg_sleep.Waiting due to a call to pg_sleep or a sibling function.
Waiting to apply WAL at recovery because it is delayed.Waiting to apply WAL during recovery because of a delay setting.