pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: pg_resetwal: Fix handling of commit timestamp XIDs
2+ messages / 1 participants
[nested] [flat]

* pgsql: pg_resetwal: Fix handling of commit timestamp XIDs
@ 2026-09-29 13:50  Heikki Linnakangas <heikki.linnakangas@iki.fi>
  0 siblings, 0 replies; 2+ messages in thread

From: Heikki Linnakangas @ 2026-09-29 13:50 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: pg_resetwal: Fix handling of commit timestamp XIDs
@ 2026-09-29 13:50  Heikki Linnakangas <heikki.linnakangas@iki.fi>
  0 siblings, 0 replies; 2+ messages in thread

From: Heikki Linnakangas @ 2026-09-29 13:50 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2026-09-29 13:50 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-09-29 13:50 pgsql: pg_resetwal: Fix handling of commit timestamp XIDs Heikki Linnakangas <heikki.linnakangas@iki.fi>
2026-09-29 13:50 pgsql: pg_resetwal: Fix handling of commit timestamp XIDs Heikki Linnakangas <heikki.linnakangas@iki.fi>

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