Commit ec3d976b authored by Heikki Linnakangas's avatar Heikki Linnakangas

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
parent 3c000fd9
...@@ -667,10 +667,10 @@ XLogRecordAssemble(RmgrId rmid, uint8 info, ...@@ -667,10 +667,10 @@ XLogRecordAssemble(RmgrId rmid, uint8 info,
{ {
samerel = true; samerel = true;
bkpb.fork_flags |= BKPBLOCK_SAME_REL; bkpb.fork_flags |= BKPBLOCK_SAME_REL;
prev_regbuf = regbuf;
} }
else else
samerel = false; samerel = false;
prev_regbuf = regbuf;
/* Ok, copy the header to the scratch buffer */ /* Ok, copy the header to the scratch buffer */
memcpy(scratch, &bkpb, SizeOfXLogRecordBlockHeader); memcpy(scratch, &bkpb, SizeOfXLogRecordBlockHeader);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment