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
This commit is contained in:
Heikki Linnakangas 2015-05-04 20:58:42 +03:00
parent 3c000fd9a6
commit ec3d976bce

View File

@ -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);