[PATCH] Fix WAL block image length diagnostic
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.
This thread has been committed, so CI has stopped here. Anything below is the last result it produced.
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:t253672psql -h localhost -U postgresBuilt from patchset v1 (message #1), September 04, 2026 at 08:15 AM.
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 t253672_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 t253672_1 && git checkout t253672_1Patchset v1 (message #1) is on t253672_1
Hi,
While reading DecodeXLogRecord(), I noticed that one error path checks
blk->bimg_len but prints blk->data_len. The latter is the length of
resource manager data and can be unrelated to the malformed block image.
[I'm assuming intention was always to print blk->bimg_len]
The attached patch reports bimg_len instead. The typo was introduced
with WAL compression in 57aa5b2bb11 and is present in all supported
branches, so I think it should be backpatched through 14?
Thoughts?
Regards,
Ayush
On Fri, Sep 04, 2026 at 01:31:03PM +0530, Ayush Tiwari wrote:
While reading DecodeXLogRecord(), I noticed that one error path checks
blk->bimg_len but prints blk->data_len. The latter is the length of
resource manager data and can be unrelated to the malformed block image.
[I'm assuming intention was always to print blk->bimg_len]
Ah, yeah, it looks like you are right on this one. Showing data_len
makes no sense.
The attached patch reports bimg_len instead. The typo was introduced
with WAL compression in 57aa5b2bb11 and is present in all supported
branches, so I think it should be backpatched through 14?
Yes. Will check later..
--
Michael