From ceae3099da7b43d1130267f6904da3c22f1b49eb Mon Sep 17 00:00:00 2001 From: Michael Paquier Date: Tue, 15 Sep 2026 07:53:41 +0900 Subject: [PATCH] Fix translation of pg_controldata and pg_resetwal's NextOID output xgettext does not recognize OID8_FORMAT and therefore extracts an incomplete message. This switches to PRIu64 instead. Kyotaro Horiguchi has noticed one problem in pg_controldata, and I have spotted the extra two ones in pg_resetwal after more review. Oversight in cb298616463d. Author: Kyotaro Horiguchi Author: Michael Paquier Discussion: https://postgr.es/m/20260914.124645.2220219320843846932.horikyota.ntt@gmail.com --- src/bin/pg_controldata/pg_controldata.c | 2 +- src/bin/pg_resetwal/pg_resetwal.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bin/pg_controldata/pg_controldata.c b/src/bin/pg_controldata/pg_controldata.c index 33f0e9e4ea9..6a0f848d8d0 100644 --- a/src/bin/pg_controldata/pg_controldata.c +++ b/src/bin/pg_controldata/pg_controldata.c @@ -269,7 +269,7 @@ main(int argc, char *argv[]) printf(_("Latest checkpoint's NextXID: %u:%u\n"), EpochFromFullTransactionId(ControlFile->checkPointCopy.nextXid), XidFromFullTransactionId(ControlFile->checkPointCopy.nextXid)); - printf(_("Latest checkpoint's NextOID: " OID8_FORMAT "\n"), + printf(_("Latest checkpoint's NextOID: %" PRIu64 "\n"), ControlFile->checkPointCopy.nextOid); printf(_("Latest checkpoint's NextMultiXactId: %u\n"), ControlFile->checkPointCopy.nextMulti); diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index b11f76a401e..41afc4c1316 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -775,7 +775,7 @@ PrintControlValues(bool guessed) printf(_("Latest checkpoint's NextXID: %u:%u\n"), EpochFromFullTransactionId(ControlFile.checkPointCopy.nextXid), XidFromFullTransactionId(ControlFile.checkPointCopy.nextXid)); - printf(_("Latest checkpoint's NextOID: " OID8_FORMAT "\n"), + printf(_("Latest checkpoint's NextOID: %" PRIu64 "\n"), ControlFile.checkPointCopy.nextOid); printf(_("Latest checkpoint's NextMultiXactId: %u\n"), ControlFile.checkPointCopy.nextMulti); @@ -861,7 +861,7 @@ PrintNewControlValues(void) if (next_oid_given) { - printf(_("NextOID: " OID8_FORMAT "\n"), + printf(_("NextOID: %" PRIu64 "\n"), ControlFile.checkPointCopy.nextOid); }