mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-12-21 08:29:39 +08:00
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:
parent
f7534296b4
commit
954523cdfe
@ -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…
Reference in New Issue
Block a user