diff options
author | Fujii Masao <fujii@postgresql.org> | 2021-11-22 10:28:21 +0900 |
---|---|---|
committer | Fujii Masao <fujii@postgresql.org> | 2021-11-22 10:28:21 +0900 |
commit | 1b06d7bac901e5fd20bba597188bae2882bf954b (patch) | |
tree | 7f1ae9f2dffcb24527a5f8bd62f7d841fd462267 /src/backend/access/transam/xlog.c | |
parent | 97f5aef609ce51422934b7dbdba599a7de4dbafd (diff) | |
download | postgresql-1b06d7bac901e5fd20bba597188bae2882bf954b.tar.gz postgresql-1b06d7bac901e5fd20bba597188bae2882bf954b.zip |
Report wait events for local shell commands like archive_command.
This commit introduces new wait events for archive_command,
archive_cleanup_command, restore_command and recovery_end_command.
Author: Fujii Masao
Reviewed-by: Bharath Rupireddy, Michael Paquier
Discussion: https://postgr.es/m/4ca4f920-6b48-638d-08b2-93598356f5d3@oss.nttdata.com
Diffstat (limited to 'src/backend/access/transam/xlog.c')
-rw-r--r-- | src/backend/access/transam/xlog.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index 16164483688..33bb0229aa7 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -5800,7 +5800,8 @@ CleanupAfterArchiveRecovery(TimeLineID EndOfLogTLI, XLogRecPtr EndOfLog, if (recoveryEndCommand && strcmp(recoveryEndCommand, "") != 0) ExecuteRecoveryCommand(recoveryEndCommand, "recovery_end_command", - true); + true, + WAIT_EVENT_RECOVERY_END_COMMAND); /* * We switched to a new timeline. Clean up segments on the old timeline. @@ -9915,7 +9916,8 @@ CreateRestartPoint(int flags) if (archiveCleanupCommand && strcmp(archiveCleanupCommand, "") != 0) ExecuteRecoveryCommand(archiveCleanupCommand, "archive_cleanup_command", - false); + false, + WAIT_EVENT_ARCHIVE_CLEANUP_COMMAND); return true; } |