summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/backend/access/transam/xlogreader.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/backend/access/transam/xlogreader.c b/src/backend/access/transam/xlogreader.c
index 06e91547dd3..f17e80948d1 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;
}