aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2023-04-26 07:30:42 +0900
committerMichael Paquier <michael@paquier.xyz>2023-04-26 07:30:42 +0900
commit1ed1b84bdcd26abf3c4d08a9cf1aa9f7834262ab (patch)
tree8d58242e3777dc7985d18524613db4861ddf147e
parent0319b306e87e04a02b672b38caf578859fcea6a3 (diff)
downloadpostgresql-1ed1b84bdcd26abf3c4d08a9cf1aa9f7834262ab.tar.gz
postgresql-1ed1b84bdcd26abf3c4d08a9cf1aa9f7834262ab.zip
Re-add tracking of wait event SLRUFlushSync
SLRUFlushSync has been accidently removed during dee663f, that has moved the flush of the SLRU files to the checkpointer, so add it back. The issue has been noticed by Thomas when checking for orphaned wait events. Author: Thomas Munro Reviewed-by: Bharath Rupireddy Discussion: https://postgr.es/m/CA+hUKGK6tqm59KuF1z+h5Y8fsWcu5v8+84kduSHwRzwjB2aa_A@mail.gmail.com
-rw-r--r--src/backend/access/transam/slru.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/backend/access/transam/slru.c b/src/backend/access/transam/slru.c
index 3afd5340911..af57fe9e53a 100644
--- a/src/backend/access/transam/slru.c
+++ b/src/backend/access/transam/slru.c
@@ -1603,7 +1603,9 @@ SlruSyncFileTag(SlruCtl ctl, const FileTag *ftag, char *path)
if (fd < 0)
return -1;
+ pgstat_report_wait_start(WAIT_EVENT_SLRU_FLUSH_SYNC);
result = pg_fsync(fd);
+ pgstat_report_wait_end();
save_errno = errno;
CloseTransientFile(fd);