From: Michael Paquier Date: Wed, 24 Oct 2018 08:02:37 +0000 (+0900) Subject: List wait events in alphabetical order X-Git-Tag: REL_12_BETA1~1350 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5ef037cf0b9e130120c5a788f1f1048f6242b076;p=postgresql List wait events in alphabetical order This changes the documentation, and the related structures so as everything is consistent. Some wait events were not listed alphabetically since their introduction, others have been added rather randomly. Keeping all those entries in order helps in maintenance, and helps the user looking at the documentation. Author: Michael Paquier, Kuntal Ghosh Discussion: https://postgr.es/m/20181024002539.GI1658@paquier.xyz Backpatch-through: 10, only for the documentation part to avoid an ABI breakage. --- diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml index 0484cfa77a..d4285ea56a 100644 --- a/doc/src/sgml/monitoring.sgml +++ b/doc/src/sgml/monitoring.sgml @@ -1193,14 +1193,14 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser CheckpointerMain Waiting in main loop of checkpointer process. - - LogicalLauncherMain - Waiting in main loop of logical launcher process. - LogicalApplyMain Waiting in main loop of logical apply process. + + LogicalLauncherMain + Waiting in main loop of logical launcher process. + PgStatMain Waiting in main loop of the statistics collector process. @@ -1280,6 +1280,10 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser BtreePage Waiting for the page number needed to continue a parallel B-tree scan to become available. + + ClogGroupUpdate + Waiting for group leader to update transaction status at transaction end. + ExecuteGather Waiting for activity from child process when executing Gather node. @@ -1368,10 +1372,6 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser MessageQueueSend Waiting to send bytes to a shared message queue. - - ParallelFinish - Waiting for parallel workers to finish computing. - ParallelBitmapScan Waiting for parallel bitmap scan to become initialized. @@ -1381,12 +1381,12 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser Waiting for parallel CREATE INDEX workers to finish heap scan. - ProcArrayGroupUpdate - Waiting for group leader to clear transaction id at transaction end. + ParallelFinish + Waiting for parallel workers to finish computing. - ClogGroupUpdate - Waiting for group leader to update transaction status at transaction end. + ProcArrayGroupUpdate + Waiting for group leader to clear transaction id at transaction end. ReplicationOriginDrop diff --git a/src/backend/postmaster/pgstat.c b/src/backend/postmaster/pgstat.c index 8de603d193..774f03f570 100644 --- a/src/backend/postmaster/pgstat.c +++ b/src/backend/postmaster/pgstat.c @@ -3484,12 +3484,12 @@ pgstat_get_wait_activity(WaitEventActivity w) case WAIT_EVENT_CHECKPOINTER_MAIN: event_name = "CheckpointerMain"; break; - case WAIT_EVENT_LOGICAL_LAUNCHER_MAIN: - event_name = "LogicalLauncherMain"; - break; case WAIT_EVENT_LOGICAL_APPLY_MAIN: event_name = "LogicalApplyMain"; break; + case WAIT_EVENT_LOGICAL_LAUNCHER_MAIN: + event_name = "LogicalLauncherMain"; + break; case WAIT_EVENT_PGSTAT_MAIN: event_name = "PgStatMain"; break; @@ -3582,6 +3582,9 @@ pgstat_get_wait_ipc(WaitEventIPC w) case WAIT_EVENT_BTREE_PAGE: event_name = "BtreePage"; break; + case WAIT_EVENT_CLOG_GROUP_UPDATE: + event_name = "ClogGroupUpdate"; + break; case WAIT_EVENT_EXECUTE_GATHER: event_name = "ExecuteGather"; break; @@ -3648,21 +3651,18 @@ pgstat_get_wait_ipc(WaitEventIPC w) case WAIT_EVENT_MQ_SEND: event_name = "MessageQueueSend"; break; - case WAIT_EVENT_PARALLEL_FINISH: - event_name = "ParallelFinish"; - break; case WAIT_EVENT_PARALLEL_BITMAP_SCAN: event_name = "ParallelBitmapScan"; break; case WAIT_EVENT_PARALLEL_CREATE_INDEX_SCAN: event_name = "ParallelCreateIndexScan"; break; + case WAIT_EVENT_PARALLEL_FINISH: + event_name = "ParallelFinish"; + break; case WAIT_EVENT_PROCARRAY_GROUP_UPDATE: event_name = "ProcArrayGroupUpdate"; break; - case WAIT_EVENT_CLOG_GROUP_UPDATE: - event_name = "ClogGroupUpdate"; - break; case WAIT_EVENT_REPLICATION_ORIGIN_DROP: event_name = "ReplicationOriginDrop"; break; diff --git a/src/include/pgstat.h b/src/include/pgstat.h index d59c24ae23..fd1d52a0c5 100644 --- a/src/include/pgstat.h +++ b/src/include/pgstat.h @@ -759,8 +759,8 @@ typedef enum WAIT_EVENT_BGWRITER_HIBERNATE, WAIT_EVENT_BGWRITER_MAIN, WAIT_EVENT_CHECKPOINTER_MAIN, - WAIT_EVENT_LOGICAL_LAUNCHER_MAIN, WAIT_EVENT_LOGICAL_APPLY_MAIN, + WAIT_EVENT_LOGICAL_LAUNCHER_MAIN, WAIT_EVENT_PGSTAT_MAIN, WAIT_EVENT_RECOVERY_WAL_ALL, WAIT_EVENT_RECOVERY_WAL_STREAM, @@ -802,6 +802,7 @@ typedef enum WAIT_EVENT_BGWORKER_SHUTDOWN = PG_WAIT_IPC, WAIT_EVENT_BGWORKER_STARTUP, WAIT_EVENT_BTREE_PAGE, + WAIT_EVENT_CLOG_GROUP_UPDATE, WAIT_EVENT_EXECUTE_GATHER, WAIT_EVENT_HASH_BATCH_ALLOCATING, WAIT_EVENT_HASH_BATCH_ELECTING, @@ -810,25 +811,24 @@ typedef enum WAIT_EVENT_HASH_BUILD_ELECTING, WAIT_EVENT_HASH_BUILD_HASHING_INNER, WAIT_EVENT_HASH_BUILD_HASHING_OUTER, + WAIT_EVENT_HASH_GROW_BATCHES_ALLOCATING, + WAIT_EVENT_HASH_GROW_BATCHES_DECIDING, WAIT_EVENT_HASH_GROW_BATCHES_ELECTING, WAIT_EVENT_HASH_GROW_BATCHES_FINISHING, WAIT_EVENT_HASH_GROW_BATCHES_REPARTITIONING, - WAIT_EVENT_HASH_GROW_BATCHES_ALLOCATING, - WAIT_EVENT_HASH_GROW_BATCHES_DECIDING, + WAIT_EVENT_HASH_GROW_BUCKETS_ALLOCATING, WAIT_EVENT_HASH_GROW_BUCKETS_ELECTING, WAIT_EVENT_HASH_GROW_BUCKETS_REINSERTING, - WAIT_EVENT_HASH_GROW_BUCKETS_ALLOCATING, WAIT_EVENT_LOGICAL_SYNC_DATA, WAIT_EVENT_LOGICAL_SYNC_STATE_CHANGE, WAIT_EVENT_MQ_INTERNAL, WAIT_EVENT_MQ_PUT_MESSAGE, WAIT_EVENT_MQ_RECEIVE, WAIT_EVENT_MQ_SEND, - WAIT_EVENT_PARALLEL_FINISH, WAIT_EVENT_PARALLEL_BITMAP_SCAN, WAIT_EVENT_PARALLEL_CREATE_INDEX_SCAN, + WAIT_EVENT_PARALLEL_FINISH, WAIT_EVENT_PROCARRAY_GROUP_UPDATE, - WAIT_EVENT_CLOG_GROUP_UPDATE, WAIT_EVENT_REPLICATION_ORIGIN_DROP, WAIT_EVENT_REPLICATION_SLOT_DROP, WAIT_EVENT_SAFE_SNAPSHOT,