From c0b3980507f459c09b5324b6536c9e1c31fad378 Mon Sep 17 00:00:00 2001 From: Michael Paquier Date: Sat, 5 Sep 2026 09:12:48 +0900 Subject: Fix incorrect error message in xlogreader.c When neither BKPIMAGE_HAS_HOLE nor BKPIMAGE_COMPRESSED is set, DecodeXLogRecord() checks that bimg_len needs to be equal to BLCKSZ. However, the associated error message reported the data length associated to a block (DecodedBkpBlock.data_len), and not the length of the block (DecodedBkpBlock.bimg_len). Oversight in 57aa5b2bb11a, probably due to some copy-paste from the surroundings. Author: Ayush Tiwari Discussion: https://postgr.es/m/CAJTYsWVz9ymE7aMt2ZiQvs1bxNvhjfTf+XaJEsdFw7MT5dvtYQ@mail.gmail.com Backpatch-through: 14 --- src/backend/access/transam/xlogreader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/access/transam/xlogreader.c b/src/backend/access/transam/xlogreader.c index 29d4df7a996..96996bcb6ae 100644 --- a/src/backend/access/transam/xlogreader.c +++ b/src/backend/access/transam/xlogreader.c @@ -1881,7 +1881,7 @@ DecodeXLogRecord(XLogReaderState *state, { report_invalid_record(state, "neither BKPIMAGE_HAS_HOLE nor BKPIMAGE_COMPRESSED set, but block image length is %u at %X/%X", - (unsigned int) blk->data_len, + (unsigned int) blk->bimg_len, LSN_FORMAT_ARGS(state->ReadRecPtr)); goto err; } -- cgit v1.2.3