From: Chao Li <li.evan.chao@gmail.com>
To: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: pg_resetwal: Fix handling of commit timestamp XIDs
Date: Wed, 30 Sep 2026 06:28:32 +0800
Message-ID: <C9F11553-E5DB-4EBF-A5F2-9857F272C3CB@gmail.com> (raw)
In-Reply-To: <9f16d092-cf92-4524-b349-3146e02ddb67@iki.fi>
References: <F61E486B-746B-42F3-A532-B8D4F1519583@gmail.com>
<9f16d092-cf92-4524-b349-3146e02ddb67@iki.fi>
> On Sep 29, 2026, at 21:50, Heikki Linnakangas <hlinnaka@iki.fi> wrote:
>
> On 29/09/2026 09:09, Chao Li wrote:
>> Hi,
>> While working on patch [1], I spotted two small issues in pg_resetwal.
>> 1. The -c option accepts two XIDs. The first is parsed by strtouint32_strict(), but the second is parsed by strtoul(). This seems to be an oversight in 636c1914b48, which introduced strtouint32_strict().
>> 2. The help message for the -c option says that “zero means no change”, but this behavior is missing on the current master branch. I checked the git history, and the behavior was lost in 978cf02bb8c, which added separate “given” flags for command-line options.
>> The fixes for both issues are tiny. See the attached patch for details.
>> Unfortunately, I reviewed both patches but didn't notice these issues at the time. Both commits were included in PG19, so this might be worth back-patching to 19.
>
> Pushed, thanks!
>
> - Heikki
>
Hi Heikki, thanks for pushing.
Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/
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 using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: li.evan.chao@gmail.com, hlinnaka@iki.fi, pgsql-hackers@lists.postgresql.org
Subject: Re: pg_resetwal: Fix handling of commit timestamp XIDs
In-Reply-To: <C9F11553-E5DB-4EBF-A5F2-9857F272C3CB@gmail.com>
* 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