postgres.git / summary / log / commit / refs

commit    890cc81b6ee2ce418d3a71d80de4aa0b0450b3b3
Author:   Heikki Linnakangas <heikki.linnakangas@iki.fi>
Date:     Wed Nov 19 16:05:42 2025 +0000
First released in: 14.21, 15.16, 16.12, 17.8, 18.2

    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 <bertranddrouvot.pg@gmail.com>
    Discussion: https://www.postgresql.org/message-id/5461bc85-e684-4531-b4d2-d2e57ad18cba@iki.fi
    Backpatch-through: 14


src/bin/pg_resetwal/pg_resetwal.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index b611f2f6c67..c6129d33e6f 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -821,6 +821,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"), [parent: 1c8c3206f4e0]