From: Heikki Linnakangas <heikki.linnakangas@iki.fi>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: pg_resetwal: Fix handling of commit timestamp XIDs
Date: Tue, 29 Sep 2026 13:50:04 +0000
Message-ID: <E1xBYDc-00000001kwt-3HF0@gemulon.postgresql.org> (raw)
pg_resetwal: Fix handling of commit timestamp XIDs
The help text for -c option documents that zero for either transaction
ID means to leave the corresponding value unchanged. Commit
978cf02bb8c replaced the separate checks for the two values with a
single flag indicating that the option was specified, causing zero to
be written to the control file instead.
Also parse the second transaction ID with strtouint32_strict(), like
the first one. Using strtoul() there was an oversight in commit
636c1914b48, which intended to reject negative and out-of-range
arguments.
Author: Chao Li <lic@highgo.com>
Discussion: https://www.postgresql.org/message-id/F61E486B-746B-42F3-A532-B8D4F1519583@gmail.com
Backpatch-through: 19
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/1f7013fe089d0e0db5b5e4a20d84acecf0f128a1
Modified Files
--------------
src/bin/pg_resetwal/pg_resetwal.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: heikki.linnakangas@iki.fi
Subject: Re: pgsql: pg_resetwal: Fix handling of commit timestamp XIDs
In-Reply-To: <E1xBYDc-00000001kwt-3HF0@gemulon.postgresql.org>
References: <E1xBYDc-00000001kwt-3HF0@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox