diff --git a/src/backend/access/transam/xlogreader.c b/src/backend/access/transam/xlogreader.c index 06e91547dd..f17e80948d 100644 --- a/src/backend/access/transam/xlogreader.c +++ b/src/backend/access/transam/xlogreader.c @@ -576,10 +576,11 @@ XLogDecodeNextRecord(XLogReaderState *state, bool nonblocking) /* * Caller supplied a position to start at. * - * In this case, NextRecPtr should already be pointing to a valid - * record starting position. + * In this case, NextRecPtr should already be pointing either to a + * valid record starting position or alternatively to the beginning of + * a page. See the header comments for XLogBeginRead. */ - Assert(XRecOffIsValid(RecPtr)); + Assert(RecPtr % XLOG_BLCKSZ == 0 || XRecOffIsValid(RecPtr)); randAccess = true; }