Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3048898

Browse files
committed
Mop-up for wait event naming issues.
Synchronize the event names for parallel hash join waits with otherevent names, by getting rid of the slashes and dropping "-ing"suffixes. Rename ClogGroupUpdate to XactGroupUpdate, to match thenew SLRU name. Move the ProcSignalBarrier event to the IPC category;it doesn't belong under IO.Also a bit more wordsmithing in the wait event documentation tables.Discussion:https://postgr.es/m/4505.1589640417@sss.pgh.pa.us
1 parent2c8dd05 commit3048898

File tree

6 files changed

+142
-126
lines changed

6 files changed

+142
-126
lines changed

‎doc/src/sgml/monitoring.sgml

Lines changed: 72 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1178,24 +1178,28 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser
11781178
</row>
11791179
<row>
11801180
<entry><literal>ControlFileRead</literal></entry>
1181-
<entry>Waiting for a read from the control file.</entry>
1181+
<entry>Waiting for a read from the <filename>pg_control</filename>
1182+
file.</entry>
11821183
</row>
11831184
<row>
11841185
<entry><literal>ControlFileSync</literal></entry>
1185-
<entry>Waiting for the control file to reach stable storage.</entry>
1186+
<entry>Waiting for the <filename>pg_control</filename> file to reach
1187+
stable storage.</entry>
11861188
</row>
11871189
<row>
11881190
<entry><literal>ControlFileSyncUpdate</literal></entry>
1189-
<entry>Waiting for an update to thecontrol file to reach stable
1190-
storage.</entry>
1191+
<entry>Waiting for an update to the<filename>pg_control</filename> file
1192+
to reach stablestorage.</entry>
11911193
</row>
11921194
<row>
11931195
<entry><literal>ControlFileWrite</literal></entry>
1194-
<entry>Waiting for a write to the control file.</entry>
1196+
<entry>Waiting for a write to the <filename>pg_control</filename>
1197+
file.</entry>
11951198
</row>
11961199
<row>
11971200
<entry><literal>ControlFileWriteUpdate</literal></entry>
1198-
<entry>Waiting for a write to update the control file.</entry>
1201+
<entry>Waiting for a write to update the <filename>pg_control</filename>
1202+
file.</entry>
11991203
</row>
12001204
<row>
12011205
<entry><literal>CopyFileRead</literal></entry>
@@ -1207,8 +1211,8 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser
12071211
</row>
12081212
<row>
12091213
<entry><literal>DSMFillZeroWrite</literal></entry>
1210-
<entry>Waiting towrite zero bytes toa dynamic shared memory backing
1211-
file.</entry>
1214+
<entry>Waiting tofilla dynamic shared memory backing file with
1215+
zeroes.</entry>
12121216
</row>
12131217
<row>
12141218
<entry><literal>DataFileExtend</literal></entry>
@@ -1308,11 +1312,6 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser
13081312
<entry><literal>LogicalRewriteWrite</literal></entry>
13091313
<entry>Waiting for a write of logical rewrite mappings.</entry>
13101314
</row>
1311-
<row>
1312-
<entry><literal>ProcSignalBarrier</literal></entry>
1313-
<entry>Waiting for a barrier event to be processed by all
1314-
backends.</entry>
1315-
</row>
13161315
<row>
13171316
<entry><literal>RelationMapRead</literal></entry>
13181317
<entry>Waiting for a read of the relation map file.</entry>
@@ -1464,7 +1463,7 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser
14641463
</row>
14651464
<row>
14661465
<entry><literal>WALSenderTimelineHistoryRead</literal></entry>
1467-
<entry>Waiting for a read from a timeline history file during walsender
1466+
<entry>Waiting for a read from a timeline history file duringawalsender
14681467
timeline command.</entry>
14691468
</row>
14701469
<row>
@@ -1473,8 +1472,8 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser
14731472
</row>
14741473
<row>
14751474
<entry><literal>WALSyncMethodAssign</literal></entry>
1476-
<entry>Waiting for data to reach stable storage while assigningWAL sync
1477-
method.</entry>
1475+
<entry>Waiting for data to reach stable storage while assigninga new
1476+
WAL syncmethod.</entry>
14781477
</row>
14791478
<row>
14801479
<entry><literal>WALWrite</literal></entry>
@@ -1497,7 +1496,7 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser
14971496
<tbody>
14981497
<row>
14991498
<entry><literal>BackupWaitWalArchive</literal></entry>
1500-
<entry>Waiting for WAL files required forthe backup to be successfully
1499+
<entry>Waiting for WAL files required fora backup to be successfully
15011500
archived.</entry>
15021501
</row>
15031502
<row>
@@ -1521,98 +1520,100 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser
15211520
<entry><literal>CheckpointStart</literal></entry>
15221521
<entry>Waiting for a checkpoint to start.</entry>
15231522
</row>
1524-
<row>
1525-
<entry><literal>ClogGroupUpdate</literal></entry>
1526-
<entry>Waiting for group leader to update transaction status at
1527-
transaction end.</entry>
1528-
</row>
15291523
<row>
15301524
<entry><literal>ExecuteGather</literal></entry>
1531-
<entry>Waiting for activity from child process while
1532-
executing <literal>Gather</literal> node.</entry>
1525+
<entry>Waiting for activity fromachild process while
1526+
executinga<literal>Gather</literal> plan node.</entry>
15331527
</row>
15341528
<row>
1535-
<entry><literal>Hash/Batch/Allocating</literal></entry>
1529+
<entry><literal>HashBatchAllocate</literal></entry>
15361530
<entry>Waiting for an elected Parallel Hash participant to allocate a hash
15371531
table.</entry>
15381532
</row>
15391533
<row>
1540-
<entry><literal>Hash/Batch/Electing</literal></entry>
1541-
<entry>Electing a Parallel Hash participant to allocate a hash table.</entry>
1534+
<entry><literal>HashBatchElect</literal></entry>
1535+
<entry>Waiting to elect a Parallel Hash participant to allocate a hash
1536+
table.</entry>
15421537
</row>
15431538
<row>
1544-
<entry><literal>Hash/Batch/Loading</literal></entry>
1539+
<entry><literal>HashBatchLoad</literal></entry>
15451540
<entry>Waiting for other Parallel Hash participants to finish loading a
15461541
hash table.</entry>
15471542
</row>
15481543
<row>
1549-
<entry><literal>Hash/Build/Allocating</literal></entry>
1544+
<entry><literal>HashBuildAllocate</literal></entry>
15501545
<entry>Waiting for an elected Parallel Hash participant to allocate the
15511546
initial hash table.</entry>
15521547
</row>
15531548
<row>
1554-
<entry><literal>Hash/Build/Electing</literal></entry>
1555-
<entry>Electing a Parallel Hash participant to allocate the initial hash table.</entry>
1549+
<entry><literal>HashBuildElect</literal></entry>
1550+
<entry>Waiting to elect a Parallel Hash participant to allocate the
1551+
initial hash table.</entry>
15561552
</row>
15571553
<row>
1558-
<entry><literal>Hash/Build/HashingInner</literal></entry>
1554+
<entry><literal>HashBuildHashInner</literal></entry>
15591555
<entry>Waiting for other Parallel Hash participants to finish hashing the
15601556
inner relation.</entry>
15611557
</row>
15621558
<row>
1563-
<entry><literal>Hash/Build/HashingOuter</literal></entry>
1559+
<entry><literal>HashBuildHashOuter</literal></entry>
15641560
<entry>Waiting for other Parallel Hash participants to finish partitioning
15651561
the outer relation.</entry>
15661562
</row>
15671563
<row>
1568-
<entry><literal>Hash/GrowBatches/Allocating</literal></entry>
1564+
<entry><literal>HashGrowBatchesAllocate</literal></entry>
15691565
<entry>Waiting for an elected Parallel Hash participant to allocate more
15701566
batches.</entry>
15711567
</row>
15721568
<row>
1573-
<entry><literal>Hash/GrowBatches/Deciding</literal></entry>
1574-
<entry>Electing a Parallel Hash participant to decide on future batch growth.</entry>
1569+
<entry><literal>HashGrowBatchesDecide</literal></entry>
1570+
<entry>Waiting to elect a Parallel Hash participant to decide on future
1571+
batch growth.</entry>
15751572
</row>
15761573
<row>
1577-
<entry><literal>Hash/GrowBatches/Electing</literal></entry>
1578-
<entry>Electing a Parallel Hash participant to allocate more batches.</entry>
1574+
<entry><literal>HashGrowBatchesElect</literal></entry>
1575+
<entry>Waiting to elect a Parallel Hash participant to allocate more
1576+
batches.</entry>
15791577
</row>
15801578
<row>
1581-
<entry><literal>Hash/GrowBatches/Finishing</literal></entry>
1579+
<entry><literal>HashGrowBatchesFinish</literal></entry>
15821580
<entry>Waiting for an elected Parallel Hash participant to decide on
15831581
future batch growth.</entry>
15841582
</row>
15851583
<row>
1586-
<entry><literal>Hash/GrowBatches/Repartitioning</literal></entry>
1587-
<entry>Waiting for other Parallel Hash participants tofinishing
1584+
<entry><literal>HashGrowBatchesRepartition</literal></entry>
1585+
<entry>Waiting for other Parallel Hash participants tofinish
15881586
repartitioning.</entry>
15891587
</row>
15901588
<row>
1591-
<entry><literal>Hash/GrowBuckets/Allocating</literal></entry>
1589+
<entry><literal>HashGrowBucketsAllocate</literal></entry>
15921590
<entry>Waiting for an elected Parallel Hash participant to finish
15931591
allocating more buckets.</entry>
15941592
</row>
15951593
<row>
1596-
<entry><literal>Hash/GrowBuckets/Electing</literal></entry>
1597-
<entry>Electing a Parallel Hash participant to allocate more buckets.</entry>
1594+
<entry><literal>HashGrowBucketsElect</literal></entry>
1595+
<entry>Waiting to elect a Parallel Hash participant to allocate more
1596+
buckets.</entry>
15981597
</row>
15991598
<row>
1600-
<entry><literal>Hash/GrowBuckets/Reinserting</literal></entry>
1599+
<entry><literal>HashGrowBucketsReinsert</literal></entry>
16011600
<entry>Waiting for other Parallel Hash participants to finish inserting
16021601
tuples into new buckets.</entry>
16031602
</row>
16041603
<row>
16051604
<entry><literal>LogicalSyncData</literal></entry>
1606-
<entry>Waiting for logical replication remote server to send data for
1605+
<entry>Waiting foralogical replication remote server to send data for
16071606
initial table synchronization.</entry>
16081607
</row>
16091608
<row>
16101609
<entry><literal>LogicalSyncStateChange</literal></entry>
1611-
<entry>Waiting for logical replication remote server to change state.</entry>
1610+
<entry>Waiting for a logical replication remote server to change
1611+
state.</entry>
16121612
</row>
16131613
<row>
16141614
<entry><literal>MessageQueueInternal</literal></entry>
1615-
<entry>Waiting for other process to be attached in shared message queue.</entry>
1615+
<entry>Waiting for another process to be attached to a shared message
1616+
queue.</entry>
16161617
</row>
16171618
<row>
16181619
<entry><literal>MessageQueuePutMessage</literal></entry>
@@ -1641,42 +1642,57 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser
16411642
</row>
16421643
<row>
16431644
<entry><literal>ProcArrayGroupUpdate</literal></entry>
1644-
<entry>Waiting for group leader to clear transaction id at transaction end.</entry>
1645+
<entry>Waiting for the group leader to clear the transaction ID at
1646+
end of a parallel operation.</entry>
1647+
</row>
1648+
<row>
1649+
<entry><literal>ProcSignalBarrier</literal></entry>
1650+
<entry>Waiting for a barrier event to be processed by all
1651+
backends.</entry>
16451652
</row>
16461653
<row>
16471654
<entry><literal>Promote</literal></entry>
16481655
<entry>Waiting for standby promotion.</entry>
16491656
</row>
16501657
<row>
16511658
<entry><literal>RecoveryConflictSnapshot</literal></entry>
1652-
<entry>Waiting for recovery conflict resolution on a vacuum cleanup.</entry>
1659+
<entry>Waiting for recovery conflict resolution for a vacuum
1660+
cleanup.</entry>
16531661
</row>
16541662
<row>
16551663
<entry><literal>RecoveryConflictTablespace</literal></entry>
1656-
<entry>Waiting for recovery conflict resolution on dropping tablespace.</entry>
1664+
<entry>Waiting for recovery conflict resolution for dropping a
1665+
tablespace.</entry>
16571666
</row>
16581667
<row>
16591668
<entry><literal>RecoveryPause</literal></entry>
16601669
<entry>Waiting for recovery to be resumed.</entry>
16611670
</row>
16621671
<row>
16631672
<entry><literal>ReplicationOriginDrop</literal></entry>
1664-
<entry>Waiting for a replication origin to become inactive to be dropped.</entry>
1673+
<entry>Waiting for a replication origin to become inactive so it can be
1674+
dropped.</entry>
16651675
</row>
16661676
<row>
16671677
<entry><literal>ReplicationSlotDrop</literal></entry>
1668-
<entry>Waiting for a replication slot to become inactive to be dropped.</entry>
1678+
<entry>Waiting for a replication slot to become inactive so it can be
1679+
dropped.</entry>
16691680
</row>
16701681
<row>
16711682
<entry><literal>SafeSnapshot</literal></entry>
1672-
<entry>Waitingfor asnapshot for a <literal>READ ONLY DEFERRABLE</literal>
1673-
transaction.</entry>
1683+
<entry>Waitingto obtain a validsnapshot for a <literal>READ ONLY
1684+
DEFERRABLE</literal>transaction.</entry>
16741685
</row>
16751686
<row>
16761687
<entry><literal>SyncRep</literal></entry>
1677-
<entry>Waiting for confirmation from remote server during synchronous
1688+
<entry>Waiting for confirmation fromaremote server during synchronous
16781689
replication.</entry>
16791690
</row>
1691+
<row>
1692+
<entry><literal>XactGroupUpdate</literal></entry>
1693+
<entry>Waiting for the group leader to update transaction status at
1694+
end of a parallel operation.</entry>
1695+
</row>
16801696
</tbody>
16811697
</tgroup>
16821698
</table>

‎src/backend/access/transam/clog.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ TransactionGroupUpdateXidStatus(TransactionId xid, XidStatus status,
473473
intextraWaits=0;
474474

475475
/* Sleep until the leader updates our XID status. */
476-
pgstat_report_wait_start(WAIT_EVENT_CLOG_GROUP_UPDATE);
476+
pgstat_report_wait_start(WAIT_EVENT_XACT_GROUP_UPDATE);
477477
for (;;)
478478
{
479479
/* acts as a read barrier */

‎src/backend/executor/nodeHash.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ MultiExecParallelHash(HashState *node)
255255
* ExecHashTableCreate(), or someone else is doing that. Either
256256
* way, wait for everyone to arrive here so we can proceed.
257257
*/
258-
BarrierArriveAndWait(build_barrier,WAIT_EVENT_HASH_BUILD_ALLOCATING);
258+
BarrierArriveAndWait(build_barrier,WAIT_EVENT_HASH_BUILD_ALLOCATE);
259259
/* Fall through. */
260260

261261
casePHJ_BUILD_HASHING_INNER:
@@ -311,7 +311,7 @@ MultiExecParallelHash(HashState *node)
311311
* counters.
312312
*/
313313
if (BarrierArriveAndWait(build_barrier,
314-
WAIT_EVENT_HASH_BUILD_HASHING_INNER))
314+
WAIT_EVENT_HASH_BUILD_HASH_INNER))
315315
{
316316
/*
317317
* Elect one backend to disable any further growth. Batches
@@ -603,7 +603,7 @@ ExecHashTableCreate(HashState *state, List *hashOperators, List *hashCollations,
603603
* backend will be elected to do that now if necessary.
604604
*/
605605
if (BarrierPhase(build_barrier)==PHJ_BUILD_ELECTING&&
606-
BarrierArriveAndWait(build_barrier,WAIT_EVENT_HASH_BUILD_ELECTING))
606+
BarrierArriveAndWait(build_barrier,WAIT_EVENT_HASH_BUILD_ELECT))
607607
{
608608
pstate->nbatch=nbatch;
609609
pstate->space_allowed=space_allowed;
@@ -1076,7 +1076,7 @@ ExecParallelHashIncreaseNumBatches(HashJoinTable hashtable)
10761076
* tuples.
10771077
*/
10781078
if (BarrierArriveAndWait(&pstate->grow_batches_barrier,
1079-
WAIT_EVENT_HASH_GROW_BATCHES_ELECTING))
1079+
WAIT_EVENT_HASH_GROW_BATCHES_ELECT))
10801080
{
10811081
dsa_pointer_atomic*buckets;
10821082
ParallelHashJoinBatch*old_batch0;
@@ -1186,7 +1186,7 @@ ExecParallelHashIncreaseNumBatches(HashJoinTable hashtable)
11861186
casePHJ_GROW_BATCHES_ALLOCATING:
11871187
/* Wait for the above to be finished. */
11881188
BarrierArriveAndWait(&pstate->grow_batches_barrier,
1189-
WAIT_EVENT_HASH_GROW_BATCHES_ALLOCATING);
1189+
WAIT_EVENT_HASH_GROW_BATCHES_ALLOCATE);
11901190
/* Fall through. */
11911191

11921192
casePHJ_GROW_BATCHES_REPARTITIONING:
@@ -1199,7 +1199,7 @@ ExecParallelHashIncreaseNumBatches(HashJoinTable hashtable)
11991199
ExecParallelHashMergeCounters(hashtable);
12001200
/* Wait for the above to be finished. */
12011201
BarrierArriveAndWait(&pstate->grow_batches_barrier,
1202-
WAIT_EVENT_HASH_GROW_BATCHES_REPARTITIONING);
1202+
WAIT_EVENT_HASH_GROW_BATCHES_REPARTITION);
12031203
/* Fall through. */
12041204

12051205
casePHJ_GROW_BATCHES_DECIDING:
@@ -1210,7 +1210,7 @@ ExecParallelHashIncreaseNumBatches(HashJoinTable hashtable)
12101210
* not helping.
12111211
*/
12121212
if (BarrierArriveAndWait(&pstate->grow_batches_barrier,
1213-
WAIT_EVENT_HASH_GROW_BATCHES_DECIDING))
1213+
WAIT_EVENT_HASH_GROW_BATCHES_DECIDE))
12141214
{
12151215
boolspace_exhausted= false;
12161216
boolextreme_skew_detected= false;
@@ -1260,7 +1260,7 @@ ExecParallelHashIncreaseNumBatches(HashJoinTable hashtable)
12601260
casePHJ_GROW_BATCHES_FINISHING:
12611261
/* Wait for the above to complete. */
12621262
BarrierArriveAndWait(&pstate->grow_batches_barrier,
1263-
WAIT_EVENT_HASH_GROW_BATCHES_FINISHING);
1263+
WAIT_EVENT_HASH_GROW_BATCHES_FINISH);
12641264
}
12651265
}
12661266

@@ -1509,7 +1509,7 @@ ExecParallelHashIncreaseNumBuckets(HashJoinTable hashtable)
15091509
casePHJ_GROW_BUCKETS_ELECTING:
15101510
/* Elect one participant to prepare to increase nbuckets. */
15111511
if (BarrierArriveAndWait(&pstate->grow_buckets_barrier,
1512-
WAIT_EVENT_HASH_GROW_BUCKETS_ELECTING))
1512+
WAIT_EVENT_HASH_GROW_BUCKETS_ELECT))
15131513
{
15141514
size_tsize;
15151515
dsa_pointer_atomic*buckets;
@@ -1538,7 +1538,7 @@ ExecParallelHashIncreaseNumBuckets(HashJoinTable hashtable)
15381538
casePHJ_GROW_BUCKETS_ALLOCATING:
15391539
/* Wait for the above to complete. */
15401540
BarrierArriveAndWait(&pstate->grow_buckets_barrier,
1541-
WAIT_EVENT_HASH_GROW_BUCKETS_ALLOCATING);
1541+
WAIT_EVENT_HASH_GROW_BUCKETS_ALLOCATE);
15421542
/* Fall through. */
15431543

15441544
casePHJ_GROW_BUCKETS_REINSERTING:
@@ -1573,7 +1573,7 @@ ExecParallelHashIncreaseNumBuckets(HashJoinTable hashtable)
15731573
CHECK_FOR_INTERRUPTS();
15741574
}
15751575
BarrierArriveAndWait(&pstate->grow_buckets_barrier,
1576-
WAIT_EVENT_HASH_GROW_BUCKETS_REINSERTING);
1576+
WAIT_EVENT_HASH_GROW_BUCKETS_REINSERT);
15771577
}
15781578
}
15791579

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp