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
pull/14/head
Heikki Linnakangas 11 years ago
parent 3c000fd9a6
commit ec3d976bce
  1. 2
      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);

Loading…
Cancel
Save