[PATCH] Fix WAL block image length diagnostic

From: Ayush Tiwari <ayushtiwari(dot)slg01(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: [PATCH] Fix WAL block image length diagnostic
Date: 2026-09-04 08:01:03
Message-ID: CAJTYsWVz9ymE7aMt2ZiQvs1bxNvhjfTf+XaJEsdFw7MT5dvtYQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

Attachment Content-Type Size
v1-0001-Fix-WAL-block-image-length-diagnostic.patch application/octet-stream 1.3 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Grigorev Jurij 2026-09-04 08:01:05 Re: BUG #19599: RestoreBlockImage: the decode cross-checks never bound hole_offset + hole_length against BLCKSZ
Previous Message Michael Paquier 2026-09-04 07:58:29 Re: pgstat: Flush some statistics within running transactions, take 2