| From: | Aviral Asthana <aviral(dot)asthana0704(at)gmail(dot)com> |
|---|---|
| To: | pgsql-hackers(at)postgresql(dot)org |
| Subject: | [PATCH] doc: Add multiplier explanation for pg_resetwal -c option |
| Date: | 2026-08-30 09:25:01 |
| Message-ID: | CAA7-H4vee7ek+u5MNN0U5Q1V_HUJ=LuojiJ5V43bJAWVu6E0QQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
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
| Attachment | Content-Type | Size |
|---|---|---|
| resetwal-patch.patch | text/plain | 2.7 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Alexandre Felipe | 2026-08-30 10:35:14 | [PATCH] handling transitions in timestamptz_trunc_* |
| Previous Message | Richard Guo | 2026-08-30 06:50:20 | Re: remove_useless_joins vs. bug #19560 |