[PATCH] Fix WAL block image length diagnostic

Started by Ayush Tiwari3 months ago2 messageshackers
Jump to latest
#1Ayush Tiwari
ayushtiwari.slg01@gmail.com

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

Attachments:

t253672_1
v1-0001-Fix-WAL-block-image-length-diagnostic.patchapplication/octet-stream; name=v1-0001-Fix-WAL-block-image-length-diagnostic.patchDownload+1-2
#2Michael Paquier
michael@paquier.xyz
In reply to: Ayush Tiwari (#1)
Re: [PATCH] Fix WAL block image length diagnostic

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