pgsql: pg_resetwal: Fix handling of commit timestamp XIDs - Mailing list pgsql-committers

From Heikki Linnakangas
Subject pgsql: pg_resetwal: Fix handling of commit timestamp XIDs
Date
Msg-id E1xBYDc-00000001kwv-3L3L@gemulon.postgresql.org
Whole thread
List pgsql-committers
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
------
REL_19_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/f1e60e0eb52d84c5467466d4fa630e8ea3627a31

Modified Files
--------------
src/bin/pg_resetwal/pg_resetwal.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)


pgsql-committers by date:

Previous
From: David Rowley
Date:
Subject: pgsql: Doc: add missing new line in DO example block
Next
From: Tom Lane
Date:
Subject: pgsql: Prevent self-join elimination when RTEs' checkAsUser fields diff