postgres.git / summary / log / commit / refs
commit 30012a04a6c8127397a8ab71e160d9c7e7fbe874
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Date: Tue Jan 28 10:55:30 2020 +0000
First released in: 13.0
Fix randAccess setting in ReadRecord()
Commit 38a957316d got this backwards.
Author: Kyotaro Horiguchi
Discussion: https://www.postgresql.org/message-id/20200128.194408.2260703306774646445.horikyota.ntt@gmail.com
src/backend/access/transam/xlog.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index 882d5e8a73f..6e09ded5974 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -4265,7 +4265,7 @@ ReadRecord(XLogReaderState *xlogreader, int emode,
/* Pass through parameters to XLogPageRead */
private->fetching_ckpt = fetching_ckpt;
private->emode = emode;
- private->randAccess = (xlogreader->ReadRecPtr != InvalidXLogRecPtr);
+ private->randAccess = (xlogreader->ReadRecPtr == InvalidXLogRecPtr);
/* This is the first attempt to read this page. */
lastSourceFailed = false;
[parent: 11da6bccd178]