summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Paquier2026-09-05 00:12:57 +0000
committerMichael Paquier2026-09-05 00:12:57 +0000
commit4305b32c98714773b4545b4827a6b927f5f2e5a5 (patch)
tree194e1f2abf0b787db65f4cdd2841d191c0f4699a
parentf419fad428639ce515a53ab7450c78ef60105960 (diff)
Fix incorrect error message in xlogreader.cREL_14_STABLE
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 <ayushtiwari.slg01@gmail.com> Discussion: https://postgr.es/m/CAJTYsWVz9ymE7aMt2ZiQvs1bxNvhjfTf+XaJEsdFw7MT5dvtYQ@mail.gmail.com Backpatch-through: 14
-rw-r--r--src/backend/access/transam/xlogreader.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/access/transam/xlogreader.c b/src/backend/access/transam/xlogreader.c
index d3bef47eb25..3c7a548bcf1 100644
--- a/src/backend/access/transam/xlogreader.c
+++ b/src/backend/access/transam/xlogreader.c
@@ -1393,7 +1393,7 @@ DecodeXLogRecord(XLogReaderState *state, XLogRecord *record, char **errormsg)
{
report_invalid_record(state,
"neither BKPIMAGE_HAS_HOLE nor BKPIMAGE_IS_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;
}