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.
This commit is contained in:
Heikki Linnakangas 2014-04-01 19:19:47 +03:00
parent f7534296b4
commit 954523cdfe

View File

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