[PATCH] doc: Add multiplier explanation for pg_resetwal -c option
Hackorum builds and tests every patch posted to the lists, not only commitfest submissions. This is Hackorum's own CI rather than the PostgreSQL project's, and it is still under testing - please report anything that looks wrong.
You can run a PostgreSQL built from this patch straight from Docker, with no checkout and no build:
docker run --rm -p 5432:5432 ghcr.io/hackorum-dev/postgres-patch:t253647psql -h localhost -U postgresBuilt from patchset v1 (message #1), September 20, 2026 at 03:03 PM.
Every patchset is also pushed to a branch of our PostgreSQL fork, so you can check out the same tree CI built. Without a PostgreSQL checkout:
git clone --branch t253647_1 https://github.com/hackorum-dev/postgres.gitIn a checkout you already have, add the fork once:
git remote add hackorum https://github.com/hackorum-dev/postgres.gitthen, for this patchset and every later one:
git fetch hackorum t253647_1 && git checkout t253647_1Patchset v1 (message #1) is on t253647_1
Hi,
I noticed that the pg_resetwal documentation for the --commit-timestamp-ids
(-c) option was missing a multiplier explanation, unlike similar options
such as --oldest-transaction-id (-u). There's even a TODO comment in the
source asking about this.
This patch adds:
- Multiplier value (21824 / 0x5540) for calculating transaction IDs from
pg_commit_ts file names
- Concrete example showing file 0007 → 0x25480
- Comment documenting the multiplier formula
The multiplier is calculated as: SLRU_PAGES_PER_SEGMENT * BLCKSZ /
SizeOfCommitTimestampEntry = 32 * 8192 / 12 = 21824
This follows the same documentation pattern used for the -u option.
Patch attached.
Thanks,
Aviral Asthana