aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/transam/xlog.c
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2024-08-02 01:57:28 +0900
committerMichael Paquier <michael@paquier.xyz>2024-08-02 01:57:28 +0900
commitb860848232aab440c9ac4c5de3563565e3d2934b (patch)
treefe59d2e97f86f1fe18fcb7e0d57b282069515e4f /src/backend/access/transam/xlog.c
parentc27090bd605a54d00c808ce1656a097fddd118f7 (diff)
downloadpostgresql-b860848232aab440c9ac4c5de3563565e3d2934b.tar.gz
postgresql-b860848232aab440c9ac4c5de3563565e3d2934b.zip
Add redo LSN to pgstats files
This is used in the startup process to check that the pgstats file we are reading includes the redo LSN referring to the shutdown checkpoint where it has been written. The redo LSN in the pgstats file needs to match with what the control file has. This is intended to be used for an upcoming change that will extend the write of the stats file to happen during checkpoints, rather than only shutdown sequences. Bump PGSTAT_FILE_FORMAT_ID. Reviewed-by: Bertrand Drouvot Discussion: https://postgr.es/m/Zp8o6_cl0KSgsnvS@paquier.xyz
Diffstat (limited to 'src/backend/access/transam/xlog.c')
-rw-r--r--src/backend/access/transam/xlog.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index 4a8a2f6098f..6499eabe4d2 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -5652,7 +5652,7 @@ StartupXLOG(void)
if (didCrash)
pgstat_discard_stats();
else
- pgstat_restore_stats();
+ pgstat_restore_stats(checkPoint.redo);
lastFullPageWrites = checkPoint.fullPageWrites;