Forgot some LSN_FORMAT_ARGS() in xlogreader.c
Hi all,
As $subject says, I noticed that while scanning the area. Any
objections to make all that more consistent with the style of HEAD?
Please see the attached.
--
Michael
Attachments:
lsn-format-fixes.patchtext/x-diff; charset=us-asciiDownload
diff --git a/src/backend/access/transam/xlogreader.c b/src/backend/access/transam/xlogreader.c
index 3ae4127b8a..c0e7c3707d 100644
--- a/src/backend/access/transam/xlogreader.c
+++ b/src/backend/access/transam/xlogreader.c
@@ -754,8 +754,7 @@ XLogDecodeOneRecord(XLogReaderState *state, bool allow_oversized)
targetRecOff == pageHeaderSize)
{
report_invalid_record(state, "contrecord is requested by %X/%X",
- (uint32) (state->DecodeRecPtr >> 32),
- (uint32) state->DecodeRecPtr);
+ LSN_FORMAT_ARGS(state->DecodeRecPtr));
goto err;
}
@@ -965,13 +964,10 @@ XLogDecodeOneRecord(XLogReaderState *state, bool allow_oversized)
pageHeader = (XLogPageHeader) state->readBuf;
if (!(pageHeader->xlp_info & XLP_FIRST_IS_CONTRECORD))
{
- report_invalid_record(
- state,
+ report_invalid_record(state,
"there is no contrecord flag at %X/%X reading %X/%X",
- (uint32) (state->recordContRecPtr >> 32),
- (uint32) state->recordContRecPtr,
- (uint32) (state->DecodeRecPtr >> 32),
- (uint32) state->DecodeRecPtr);
+ LSN_FORMAT_ARGS(state->recordContRecPtr),
+ LSN_FORMAT_ARGS(state->DecodeRecPtr));
goto err;
}
@@ -986,10 +982,8 @@ XLogDecodeOneRecord(XLogReaderState *state, bool allow_oversized)
state,
"invalid contrecord length %u at %X/%X reading %X/%X, expected %u",
pageHeader->xlp_rem_len,
- (uint32) (state->recordContRecPtr >> 32),
- (uint32) state->recordContRecPtr,
- (uint32) (state->DecodeRecPtr >> 32),
- (uint32) state->DecodeRecPtr,
+ LSN_FORMAT_ARGS(state->recordContRecPtr),
+ LSN_FORMAT_ARGS(state->DecodeRecPtr),
state->recordRemainLen);
goto err;
}
Michael Paquier <michael@paquier.xyz> writes:
As $subject says, I noticed that while scanning the area. Any
objections to make all that more consistent with the style of HEAD?
Please see the attached.
+1, it's not surprising some places didn't get that memo yet.
regards, tom lane
At Fri, 23 Apr 2021 13:54:15 +0900, Michael Paquier <michael@paquier.xyz> wrote in
Hi all,
As $subject says, I noticed that while scanning the area. Any
objections to make all that more consistent with the style of HEAD?
Please see the attached.
AFAICS it fixes the all remaining LSN parameters.
regards.
--
Kyotaro Horiguchi
NTT Open Source Software Center