postgres.git / summary / log / commit / refs
commit ec3d976bce7e322c29f1007d19b63b7a3a1a6ee4
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Date: Mon May 04 17:58:42 2015 +0000
Fix the same-rel optimization when creating WAL records.
prev_regbuf was never set, and therefore the same-rel flag was never set on
WAL records.
Report and fix by Zhanq Zq
src/backend/access/transam/xloginsert.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/backend/access/transam/xloginsert.c b/src/backend/access/transam/xloginsert.c
index 0cdb6af052d..419736da310 100644
--- a/src/backend/access/transam/xloginsert.c
+++ b/src/backend/access/transam/xloginsert.c
@@ -667,10 +667,10 @@ XLogRecordAssemble(RmgrId rmid, uint8 info,
{
samerel = true;
bkpb.fork_flags |= BKPBLOCK_SAME_REL;
- prev_regbuf = regbuf;
}
else
samerel = false;
+ prev_regbuf = regbuf;
/* Ok, copy the header to the scratch buffer */
memcpy(scratch, &bkpb, SizeOfXLogRecordBlockHeader);
[parent: 3c000fd9a68d]