Unordered wait event ClogGroupUpdate
Hi all,
baaf272 has added support for group updates in clog, however it has
added the wait event WAIT_EVENT_CLOG_GROUP_UPDATE in a non-alphabetical
order. There are many events, so keeping things in order helps users in
finding them.
Are there any objections to the attached, which reorders things
properly? This is a patch for HEAD, for v11 I propose to only fix the
documentation side of things to avoid an ABI breakage.
I checked the other wait events and things are in order.
Thanks,
--
Michael
Attachments:
fix-clog-event.patchtext/x-diff; charset=us-asciiDownload
diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml
index 0484cfa77a..a173ebf5c3 100644
--- a/doc/src/sgml/monitoring.sgml
+++ b/doc/src/sgml/monitoring.sgml
@@ -1280,6 +1280,10 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser
<entry><literal>BtreePage</literal></entry>
<entry>Waiting for the page number needed to continue a parallel B-tree scan to become available.</entry>
</row>
+ <row>
+ <entry><literal>ClogGroupUpdate</literal></entry>
+ <entry>Waiting for group leader to update transaction status at transaction end.</entry>
+ </row>
<row>
<entry><literal>ExecuteGather</literal></entry>
<entry>Waiting for activity from child process when executing <literal>Gather</literal> node.</entry>
@@ -1384,10 +1388,6 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser
<entry><literal>ProcArrayGroupUpdate</literal></entry>
<entry>Waiting for group leader to clear transaction id at transaction end.</entry>
</row>
- <row>
- <entry><literal>ClogGroupUpdate</literal></entry>
- <entry>Waiting for group leader to update transaction status at transaction end.</entry>
- </row>
<row>
<entry><literal>ReplicationOriginDrop</literal></entry>
<entry>Waiting for a replication origin to become inactive to be dropped.</entry>
diff --git a/src/backend/postmaster/pgstat.c b/src/backend/postmaster/pgstat.c
index 8de603d193..9c75e250bf 100644
--- a/src/backend/postmaster/pgstat.c
+++ b/src/backend/postmaster/pgstat.c
@@ -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;
@@ -3660,9 +3663,6 @@ pgstat_get_wait_ipc(WaitEventIPC w)
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..cdb3f6da04 100644
--- a/src/include/pgstat.h
+++ b/src/include/pgstat.h
@@ -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,
@@ -828,7 +829,6 @@ typedef enum
WAIT_EVENT_PARALLEL_BITMAP_SCAN,
WAIT_EVENT_PARALLEL_CREATE_INDEX_SCAN,
WAIT_EVENT_PROCARRAY_GROUP_UPDATE,
- WAIT_EVENT_CLOG_GROUP_UPDATE,
WAIT_EVENT_REPLICATION_ORIGIN_DROP,
WAIT_EVENT_REPLICATION_SLOT_DROP,
WAIT_EVENT_SAFE_SNAPSHOT,
On Wed, Oct 24, 2018 at 5:56 AM Michael Paquier <michael@paquier.xyz> wrote:
baaf272 has added support for group updates in clog, however it has
added the wait event WAIT_EVENT_CLOG_GROUP_UPDATE in a non-alphabetical
order. There are many events, so keeping things in order helps users in
finding them.
That's a valid argument. Additionally, I've found
WAIT_EVENT_HASH_GROW_BUCKETS_ALLOCATING and
WAIT_EVENT_HASH_GROW_BATCHES_ALLOCATING are added in a
non-alphabetical order in WaitEventIPC enum.
Are there any objections to the attached, which reorders things
properly? This is a patch for HEAD, for v11 I propose to only fix the
documentation side of things to avoid an ABI breakage.
+1
--
Thanks & Regards,
Kuntal Ghosh
EnterpriseDB: http://www.enterprisedb.com
On Wed, Oct 24, 2018 at 10:25:37AM +0530, Kuntal Ghosh wrote:
That's a valid argument. Additionally, I've found
WAIT_EVENT_HASH_GROW_BUCKETS_ALLOCATING and
WAIT_EVENT_HASH_GROW_BATCHES_ALLOCATING are added in a
non-alphabetical order in WaitEventIPC enum.
Indeed, thanks for double-checking.
And those ones are also incorrect after another lookup:
- WAIT_EVENT_PARALLEL_FINISH
- WAIT_EVENT_HASH_GROW_BATCHES_DECIDING
- WAIT_EVENT_LOGICAL_APPLY_MAIN
I don't see more of them..
--
Michael
On Wed, Oct 24, 2018 at 10:48 AM Michael Paquier <michael@paquier.xyz> wrote:
That's a valid argument. Additionally, I've found
WAIT_EVENT_HASH_GROW_BUCKETS_ALLOCATING and
WAIT_EVENT_HASH_GROW_BATCHES_ALLOCATING are added in a
non-alphabetical order in WaitEventIPC enum.And those ones are also incorrect after another lookup:
- WAIT_EVENT_PARALLEL_FINISH
- WAIT_EVENT_HASH_GROW_BATCHES_DECIDING
- WAIT_EVENT_LOGICAL_APPLY_MAIN
I don't see more of them..
Nice. Same here.
--
Thanks & Regards,
Kuntal Ghosh
EnterpriseDB: http://www.enterprisedb.com
On Wed, Oct 24, 2018 at 10:59:35AM +0530, Kuntal Ghosh wrote:
Nice. Same here.
Thanks for confirming. I have committed the change, with HEAD making
the structures and the documentation consistent. Down to 10, only the
documentation has been changed, where it is adapted.
--
Michael