From: Heikki Linnakangas Date: Wed, 19 Nov 2025 16:05:42 +0000 (+0200) Subject: Print new OldestXID value in pg_resetwal when it's being changed X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=19594271c1a2b5447f4ee85cd7676606faa2a682;p=postgresql.git Print new OldestXID value in pg_resetwal when it's being changed Commit 74cf7d46a91d added the --oldest-transaction-id option to pg_resetwal, but forgot to update the code that prints all the new values that are being set. Fix that. Reviewed-by: Bertrand Drouvot Discussion: https://www.postgresql.org/message-id/5461bc85-e684-4531-b4d2-d2e57ad18cba@iki.fi Backpatch-through: 14 --- diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index cfc49035f06..3cbf898d031 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -852,6 +852,10 @@ PrintNewControlValues(void) { printf(_("NextXID: %u\n"), XidFromFullTransactionId(ControlFile.checkPointCopy.nextXid)); + } + + if (set_oldest_xid != 0) + { printf(_("OldestXID: %u\n"), ControlFile.checkPointCopy.oldestXid); printf(_("OldestXID's DB: %u\n"),