[PATCH] Fix WAL block image length diagnostic
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