Skip to content
Snippets Groups Projects
Commit 8bbbcb91 authored by Heikki Linnakangas's avatar Heikki Linnakangas
Browse files

Fix bug in the new GIN 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 and it needs to be marked dirty. The codepath for an insertion got
this right, but the case where the internal node is split because of
inserting the new downlink missed that.
parent 6eff0acc
No related branches found
No related tags found
No related merge requests found
......@@ -543,6 +543,8 @@ ginPlaceToPage(GinBtree btree, GinBtreeStack *stack,
MarkBufferDirty(rbuffer);
MarkBufferDirty(stack->buffer);
if (BufferIsValid(childbuf))
MarkBufferDirty(childbuf);
/*
* Restore the temporary copies over the real buffers. But don't free
......@@ -571,6 +573,8 @@ ginPlaceToPage(GinBtree btree, GinBtreeStack *stack,
PageSetLSN(BufferGetPage(rbuffer), recptr);
if (stack->parent == NULL)
PageSetLSN(BufferGetPage(lbuffer), recptr);
if (BufferIsValid(childbuf))
PageSetLSN(childpage, recptr);
}
END_CRIT_SECTION();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment