Commit 18d938de authored by Fujii Masao's avatar Fujii Masao

Make pg_controldata report newest XID with valid commit timestamp

Previously pg_controldata didn't report newestCommitTs and this was
an oversight in commit 73c986ad.

Also this patch changes pg_resetxlog so that it uses the same sentences
as pg_controldata does, regarding oldestCommitTs and newestCommitTs,
for the sake of consistency.

Back-patch to 9.5 where track_commit_timestamp was added.

Euler Taveira
parent 020235a5
...@@ -273,6 +273,8 @@ main(int argc, char *argv[]) ...@@ -273,6 +273,8 @@ main(int argc, char *argv[])
ControlFile.checkPointCopy.oldestMultiDB); ControlFile.checkPointCopy.oldestMultiDB);
printf(_("Latest checkpoint's oldestCommitTs: %u\n"), printf(_("Latest checkpoint's oldestCommitTs: %u\n"),
ControlFile.checkPointCopy.oldestCommitTs); ControlFile.checkPointCopy.oldestCommitTs);
printf(_("Latest checkpoint's newestCommitTs: %u\n"),
ControlFile.checkPointCopy.newestCommitTs);
printf(_("Time of latest checkpoint: %s\n"), printf(_("Time of latest checkpoint: %s\n"),
ckpttime_str); ckpttime_str);
printf(_("Fake LSN counter for unlogged rels: %X/%X\n"), printf(_("Fake LSN counter for unlogged rels: %X/%X\n"),
......
...@@ -665,9 +665,9 @@ PrintControlValues(bool guessed) ...@@ -665,9 +665,9 @@ PrintControlValues(bool guessed)
ControlFile.checkPointCopy.oldestMulti); ControlFile.checkPointCopy.oldestMulti);
printf(_("Latest checkpoint's oldestMulti's DB: %u\n"), printf(_("Latest checkpoint's oldestMulti's DB: %u\n"),
ControlFile.checkPointCopy.oldestMultiDB); ControlFile.checkPointCopy.oldestMultiDB);
printf(_("Latest checkpoint's oldest CommitTs: %u\n"), printf(_("Latest checkpoint's oldestCommitTs: %u\n"),
ControlFile.checkPointCopy.oldestCommitTs); ControlFile.checkPointCopy.oldestCommitTs);
printf(_("Latest checkpoint's newest CommitTs: %u\n"), printf(_("Latest checkpoint's newestCommitTs: %u\n"),
ControlFile.checkPointCopy.newestCommitTs); ControlFile.checkPointCopy.newestCommitTs);
printf(_("Maximum data alignment: %u\n"), printf(_("Maximum data alignment: %u\n"),
ControlFile.maxAlign); ControlFile.maxAlign);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment