Skip to content

Commit 4a5d55e

Browse files
committed
Fix bug in the new B-tree incomplete-split code.
Forgot to update LSN of left sibling's page, when creating a new root. I fixed this for regular insertions and page splits earlier, but missed new root creation.
1 parent 45e67a2 commit 4a5d55e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/backend/access/nbtree/nbtinsert.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2120,6 +2120,7 @@ _bt_newroot(Relation rel, Buffer lbuf, Buffer rbuf)
21202120

21212121
recptr = XLogInsert(RM_BTREE_ID, XLOG_BTREE_NEWROOT, rdata);
21222122

2123+
PageSetLSN(lpage, recptr);
21232124
PageSetLSN(rootpage, recptr);
21242125
PageSetLSN(metapg, recptr);
21252126
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy