]> granicus.if.org Git - postgresql/commitdiff
Make pg_controldata report newest XID with valid commit timestamp
authorFujii Masao <fujii@postgresql.org>
Thu, 24 Sep 2015 14:31:17 +0000 (23:31 +0900)
committerFujii Masao <fujii@postgresql.org>
Thu, 24 Sep 2015 14:31:17 +0000 (23:31 +0900)
Previously pg_controldata didn't report newestCommitTs and this was
an oversight in commit 73c986a.

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

src/bin/pg_controldata/pg_controldata.c
src/bin/pg_resetxlog/pg_resetxlog.c

index 704f72d3c503015b87b4ace48c530896a14f47dd..32e1d81bf20fdb5fbbde6b459eadf2221199fa4b 100644 (file)
@@ -273,6 +273,8 @@ main(int argc, char *argv[])
                   ControlFile.checkPointCopy.oldestMultiDB);
        printf(_("Latest checkpoint's oldestCommitTs:   %u\n"),
                   ControlFile.checkPointCopy.oldestCommitTs);
+       printf(_("Latest checkpoint's newestCommitTs:   %u\n"),
+                  ControlFile.checkPointCopy.newestCommitTs);
        printf(_("Time of latest checkpoint:            %s\n"),
                   ckpttime_str);
        printf(_("Fake LSN counter for unlogged rels:   %X/%X\n"),
index c8c1ac32880d54ccbee48bc164637006219a18c0..d7ac2ba2715dc9771895e69c5780ad55951a8aac 100644 (file)
@@ -665,9 +665,9 @@ PrintControlValues(bool guessed)
                   ControlFile.checkPointCopy.oldestMulti);
        printf(_("Latest checkpoint's oldestMulti's DB: %u\n"),
                   ControlFile.checkPointCopy.oldestMultiDB);
-       printf(_("Latest checkpoint's oldest CommitTs:  %u\n"),
+       printf(_("Latest checkpoint's oldestCommitTs:   %u\n"),
                   ControlFile.checkPointCopy.oldestCommitTs);
-       printf(_("Latest checkpoint's newest CommitTs:  %u\n"),
+       printf(_("Latest checkpoint's newestCommitTs:   %u\n"),
                   ControlFile.checkPointCopy.newestCommitTs);
        printf(_("Maximum data alignment:               %u\n"),
                   ControlFile.maxAlign);