0001-Print-new-OldestXID-value-in-pg_resetwal-when-it-s-b.patch
text/x-patch
Filename: 0001-Print-new-OldestXID-value-in-pg_resetwal-when-it-s-b.patch
Type: text/x-patch
Part: 0
Patch
Same data as JSON:
GET /api/v1/attachments/:id/patch
the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes.
API reference →
Format: format-patch
Series: patch 0001
Subject: Print new OldestXID value in pg_resetwal when it's being changed
| File | + | − |
|---|---|---|
| src/bin/pg_resetwal/pg_resetwal.c | 4 | 0 |
From 43c0d26852f9fd1b0c7f0b274acb72bc6985414f Mon Sep 17 00:00:00 2001
From: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Date: Wed, 19 Nov 2025 11:48:30 +0200
Subject: [PATCH 1/1] 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.
Discussion: XXX
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 a31e7643cf0..8d5d9805279 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -839,6 +839,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"),
--
2.47.3