Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 1d253ba

Browse files
committed
Rename the recovery-related wait events.
This commit renames RecoveryWalAll and RecoveryWalStream wait events to RecoveryWalStream and RecoveryRetrieveRetryInterval, respectively, in order to make the names and what they are more consistent. For example, previously RecoveryWalAll was reported as a wait event while the recovery was waiting for WAL from a stream, and which was confusing because the name was very different from the situation where the wait actually could happen. The names of macro variables for those wait events also are renamed accordingly. This commit also changes the category of RecoveryRetrieveRetryInterval to Timeout from Activity because the wait event is reported while waiting based on wal_retrieve_retry_interval. Author: Fujii Masao Reviewed-by: Kyotaro Horiguchi, Atsushi Torikoshi Discussion: https://postgr.es/m/124997ee-096a-5d09-d8da-2c7a57d0816e@oss.nttdata.com
1 parent 72e78d8 commit 1d253ba

File tree

4 files changed

+18
-18
lines changed

4 files changed

+18
-18
lines changed

doc/src/sgml/monitoring.sgml

+11-11
Original file line numberDiff line numberDiff line change
@@ -1244,7 +1244,7 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser
12441244
<entry>Waiting to acquire a pin on a buffer.</entry>
12451245
</row>
12461246
<row>
1247-
<entry morerows="13"><literal>Activity</literal></entry>
1247+
<entry morerows="12"><literal>Activity</literal></entry>
12481248
<entry><literal>ArchiverMain</literal></entry>
12491249
<entry>Waiting in main loop of the archiver process.</entry>
12501250
</row>
@@ -1276,17 +1276,9 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser
12761276
<entry><literal>PgStatMain</literal></entry>
12771277
<entry>Waiting in main loop of the statistics collector process.</entry>
12781278
</row>
1279-
<row>
1280-
<entry><literal>RecoveryWalAll</literal></entry>
1281-
<entry>Waiting for WAL from a stream at recovery.</entry>
1282-
</row>
12831279
<row>
12841280
<entry><literal>RecoveryWalStream</literal></entry>
1285-
<entry>
1286-
Waiting when WAL data is not available from any kind of sources
1287-
(local, archive or stream) before trying again to retrieve WAL data,
1288-
at recovery.
1289-
</entry>
1281+
<entry>Waiting for WAL from a stream at recovery.</entry>
12901282
</row>
12911283
<row>
12921284
<entry><literal>SysLoggerMain</literal></entry>
@@ -1496,7 +1488,7 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser
14961488
<entry>Waiting for confirmation from remote server during synchronous replication.</entry>
14971489
</row>
14981490
<row>
1499-
<entry morerows="2"><literal>Timeout</literal></entry>
1491+
<entry morerows="3"><literal>Timeout</literal></entry>
15001492
<entry><literal>BaseBackupThrottle</literal></entry>
15011493
<entry>Waiting during base backup when throttling activity.</entry>
15021494
</row>
@@ -1508,6 +1500,14 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser
15081500
<entry><literal>RecoveryApplyDelay</literal></entry>
15091501
<entry>Waiting to apply WAL at recovery because it is delayed.</entry>
15101502
</row>
1503+
<row>
1504+
<entry><literal>RecoveryRetrieveRetryInterval</literal></entry>
1505+
<entry>
1506+
Waiting when WAL data is not available from any kind of sources
1507+
(<filename>pg_wal</filename>, archive or stream) before trying
1508+
again to retrieve WAL data, at recovery.
1509+
</entry>
1510+
</row>
15111511
<row>
15121512
<entry morerows="68"><literal>IO</literal></entry>
15131513
<entry><literal>BufFileRead</literal></entry>

src/backend/access/transam/xlog.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -12031,7 +12031,7 @@ WaitForWALToBecomeAvailable(XLogRecPtr RecPtr, bool randAccess,
1203112031
WL_LATCH_SET | WL_TIMEOUT |
1203212032
WL_EXIT_ON_PM_DEATH,
1203312033
wait_time,
12034-
WAIT_EVENT_RECOVERY_WAL_STREAM);
12034+
WAIT_EVENT_RECOVERY_RETRIEVE_RETRY_INTERVAL);
1203512035
ResetLatch(&XLogCtl->recoveryWakeupLatch);
1203612036
now = GetCurrentTimestamp();
1203712037
}
@@ -12221,7 +12221,7 @@ WaitForWALToBecomeAvailable(XLogRecPtr RecPtr, bool randAccess,
1222112221
(void) WaitLatch(&XLogCtl->recoveryWakeupLatch,
1222212222
WL_LATCH_SET | WL_TIMEOUT |
1222312223
WL_EXIT_ON_PM_DEATH,
12224-
5000L, WAIT_EVENT_RECOVERY_WAL_ALL);
12224+
5000L, WAIT_EVENT_RECOVERY_WAL_STREAM);
1222512225
ResetLatch(&XLogCtl->recoveryWakeupLatch);
1222612226
break;
1222712227
}

src/backend/postmaster/pgstat.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -3602,9 +3602,6 @@ pgstat_get_wait_activity(WaitEventActivity w)
36023602
case WAIT_EVENT_PGSTAT_MAIN:
36033603
event_name = "PgStatMain";
36043604
break;
3605-
case WAIT_EVENT_RECOVERY_WAL_ALL:
3606-
event_name = "RecoveryWalAll";
3607-
break;
36083605
case WAIT_EVENT_RECOVERY_WAL_STREAM:
36093606
event_name = "RecoveryWalStream";
36103607
break;
@@ -3824,6 +3821,9 @@ pgstat_get_wait_timeout(WaitEventTimeout w)
38243821
case WAIT_EVENT_RECOVERY_APPLY_DELAY:
38253822
event_name = "RecoveryApplyDelay";
38263823
break;
3824+
case WAIT_EVENT_RECOVERY_RETRIEVE_RETRY_INTERVAL:
3825+
event_name = "RecoveryRetrieveRetryInterval";
3826+
break;
38273827
/* no default case, so that compiler will warn */
38283828
}
38293829

src/include/pgstat.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -761,7 +761,6 @@ typedef enum
761761
WAIT_EVENT_LOGICAL_APPLY_MAIN,
762762
WAIT_EVENT_LOGICAL_LAUNCHER_MAIN,
763763
WAIT_EVENT_PGSTAT_MAIN,
764-
WAIT_EVENT_RECOVERY_WAL_ALL,
765764
WAIT_EVENT_RECOVERY_WAL_STREAM,
766765
WAIT_EVENT_SYSLOGGER_MAIN,
767766
WAIT_EVENT_WAL_RECEIVER_MAIN,
@@ -848,7 +847,8 @@ typedef enum
848847
{
849848
WAIT_EVENT_BASE_BACKUP_THROTTLE = PG_WAIT_TIMEOUT,
850849
WAIT_EVENT_PG_SLEEP,
851-
WAIT_EVENT_RECOVERY_APPLY_DELAY
850+
WAIT_EVENT_RECOVERY_APPLY_DELAY,
851+
WAIT_EVENT_RECOVERY_RETRIEVE_RETRY_INTERVAL
852852
} WaitEventTimeout;
853853

854854
/* ----------

0 commit comments

Comments
 (0)