Commit d4116a77 authored by Robert Haas's avatar Robert Haas
parent dbb2a931
...@@ -1232,7 +1232,7 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser ...@@ -1232,7 +1232,7 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser
<entry>Waiting in an extension.</entry> <entry>Waiting in an extension.</entry>
</row> </row>
<row> <row>
<entry morerows="11"><literal>IPC</></entry> <entry morerows="12"><literal>IPC</></entry>
<entry><literal>BgWorkerShutdown</></entry> <entry><literal>BgWorkerShutdown</></entry>
<entry>Waiting for background worker to shut down.</entry> <entry>Waiting for background worker to shut down.</entry>
</row> </row>
...@@ -1272,6 +1272,9 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser ...@@ -1272,6 +1272,9 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser
<entry><literal>ParallelBitmapPopulate</></entry> <entry><literal>ParallelBitmapPopulate</></entry>
<entry>Waiting for the leader to populate the TidBitmap.</entry> <entry>Waiting for the leader to populate the TidBitmap.</entry>
</row> </row>
<row>
<entry><literal>ProcArrayGroupUpdate</></entry>
<entry>Waiting for group leader to clear transaction id at transaction end.</entry>
<row> <row>
<entry><literal>SafeSnapshot</></entry> <entry><literal>SafeSnapshot</></entry>
<entry>Waiting for a snapshot for a <literal>READ ONLY DEFERRABLE</> transaction.</entry> <entry>Waiting for a snapshot for a <literal>READ ONLY DEFERRABLE</> transaction.</entry>
......
...@@ -3560,6 +3560,9 @@ pgstat_get_wait_ipc(WaitEventIPC w) ...@@ -3560,6 +3560,9 @@ pgstat_get_wait_ipc(WaitEventIPC w)
case WAIT_EVENT_PARALLEL_BITMAP_SCAN: case WAIT_EVENT_PARALLEL_BITMAP_SCAN:
event_name = "ParallelBitmapScan"; event_name = "ParallelBitmapScan";
break; break;
case WAIT_EVENT_PROCARRAY_GROUP_UPDATE:
event_name = "ProcArrayGroupUpdate";
break;
case WAIT_EVENT_SAFE_SNAPSHOT: case WAIT_EVENT_SAFE_SNAPSHOT:
event_name = "SafeSnapshot"; event_name = "SafeSnapshot";
break; break;
......
...@@ -53,6 +53,7 @@ ...@@ -53,6 +53,7 @@
#include "access/xlog.h" #include "access/xlog.h"
#include "catalog/catalog.h" #include "catalog/catalog.h"
#include "miscadmin.h" #include "miscadmin.h"
#include "pgstat.h"
#include "storage/proc.h" #include "storage/proc.h"
#include "storage/procarray.h" #include "storage/procarray.h"
#include "storage/spin.h" #include "storage/spin.h"
...@@ -513,6 +514,7 @@ ProcArrayGroupClearXid(PGPROC *proc, TransactionId latestXid) ...@@ -513,6 +514,7 @@ ProcArrayGroupClearXid(PGPROC *proc, TransactionId latestXid)
int extraWaits = 0; int extraWaits = 0;
/* Sleep until the leader clears our XID. */ /* Sleep until the leader clears our XID. */
pgstat_report_wait_start(WAIT_EVENT_PROCARRAY_GROUP_UPDATE);
for (;;) for (;;)
{ {
/* acts as a read barrier */ /* acts as a read barrier */
...@@ -521,6 +523,7 @@ ProcArrayGroupClearXid(PGPROC *proc, TransactionId latestXid) ...@@ -521,6 +523,7 @@ ProcArrayGroupClearXid(PGPROC *proc, TransactionId latestXid)
break; break;
extraWaits++; extraWaits++;
} }
pgstat_report_wait_end();
Assert(pg_atomic_read_u32(&proc->procArrayGroupNext) == INVALID_PGPROCNO); Assert(pg_atomic_read_u32(&proc->procArrayGroupNext) == INVALID_PGPROCNO);
......
...@@ -808,6 +808,7 @@ typedef enum ...@@ -808,6 +808,7 @@ typedef enum
WAIT_EVENT_MQ_SEND, WAIT_EVENT_MQ_SEND,
WAIT_EVENT_PARALLEL_FINISH, WAIT_EVENT_PARALLEL_FINISH,
WAIT_EVENT_PARALLEL_BITMAP_SCAN, WAIT_EVENT_PARALLEL_BITMAP_SCAN,
WAIT_EVENT_PROCARRAY_GROUP_UPDATE,
WAIT_EVENT_SAFE_SNAPSHOT, WAIT_EVENT_SAFE_SNAPSHOT,
WAIT_EVENT_SYNC_REP, WAIT_EVENT_SYNC_REP,
WAIT_EVENT_LOGICAL_SYNC_DATA, WAIT_EVENT_LOGICAL_SYNC_DATA,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment