While working on the 64-bit multixid offsets patch and commit
94939c5f3a, I got a little annoyed by how lax pg_resetwal is about
out-of-range values. These are currently accepted, for example:
# Negative XID
pg_resetwal -D data -x -1000
# XID larger than 2^32 (on some platforms)
pg_resetwal -D data -x 10000000000
The first attached patch tightens up the parsing to reject those.
The second attached patch is just refactoring. Currently, we use invalid
values for the variables backing each of the options to mean "option was
not given". I think it would be more clear to have separate boolean
variables for that. I did that for the --multixact-ids option in commit
f99e30149f already, because there was no unused value for multixid that
we could use. This patch expands that to all the options.
- Heikki