On 2/27/26 08:12, Fujii Masao wrote:
On Fri, Feb 20, 2026 at 2:42 PM David Steele <[email protected]> wrote:+ GUC_check_errdetail("\"%s\" without epoch must greater than or equal to %u.", "must greater" shiould be "must be greater"?
Fixed in v2 attached to the prior email.
"without epoch" seems not necessary to me.
I guess that depends on whether or not we error if the epoch is present, see below.
+ /* + * This cast will remove the epoch, if any + */ + xid = (TransactionId) strtou64(*newval, &endp, 0); Would it be better to use strtouint32_strict() instead of strtou64()? That would allow us to detect invalid XID values larger than 2^32 and report an error, similar to what pg_resetwal -x does.
This was my first instinct, but it causes our integration tests to fail because pg_current_xact_id() returns the xid with epoch. You can fix this by casting pg_current_xact_id()::xid but this seems like a pretty big change in usage. I'm OK with it but we'd definitely need to update the documentation to match.
What do you think? Regards -David
