Branching off from [0], here is a for-discussion patch about some
corrections for the pg_resetwal -c (--commit-timestamp-ids) option.
First, in the documentation for finding a manual value for the -c option
based on the files present in the data directory, it was missing a
multiplier, like for the other SLRU-based values, and also missing the
mention of adding one for the upper value. The value I came up with is
computed as
SLRU_PAGES_PER_SEGMENT * COMMIT_TS_XACTS_PER_PAGE = 13088 = 0x3320
Second, the present pg_resetwal code hardcodes the minimum value as 2,
which is FrozenTransactionId, but it's not clear why that is allowed.
Maybe we should change that to FirstNormalTransactionId, which matches
other xid-related options in pg_resetwal.
Thoughts?
[0]:
https://www.postgresql.org/message-id/flat/0f3ab4a1-ae80-56e8-3426-6b4a02507687@eisentraut.org