Fix bug in the new B-tree incomplete-split code.

Inserting a downlink to an internal page clears the incomplete-split flag
of the child's left sibling, so the left sibling's LSN also needs to be
updated.
pull/6/head
Heikki Linnakangas 12 years ago
parent f7534296b4
commit 954523cdfe
  1. 8
      src/backend/access/nbtree/nbtinsert.c

@ -910,6 +910,10 @@ _bt_insertonpg(Relation rel,
{
PageSetLSN(metapg, recptr);
}
if (BufferIsValid(cbuf))
{
PageSetLSN(BufferGetPage(cbuf), recptr);
}
PageSetLSN(page, recptr);
}
@ -1402,6 +1406,10 @@ _bt_split(Relation rel, Buffer buf, Buffer cbuf, OffsetNumber firstright,
{
PageSetLSN(spage, recptr);
}
if (!isleaf)
{
PageSetLSN(BufferGetPage(cbuf), recptr);
}
}
END_CRIT_SECTION();

Loading…
Cancel
Save