From 4a5d55ec2b711e13438a32d119a809a22ced410b Mon Sep 17 00:00:00 2001 From: Heikki Linnakangas Date: Tue, 22 Apr 2014 22:40:44 +0300 Subject: [PATCH] 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. --- src/backend/access/nbtree/nbtinsert.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/backend/access/nbtree/nbtinsert.c b/src/backend/access/nbtree/nbtinsert.c index 922412eef1..48cb809a0f 100644 --- a/src/backend/access/nbtree/nbtinsert.c +++ b/src/backend/access/nbtree/nbtinsert.c @@ -2120,6 +2120,7 @@ _bt_newroot(Relation rel, Buffer lbuf, Buffer rbuf) recptr = XLogInsert(RM_BTREE_ID, XLOG_BTREE_NEWROOT, rdata); + PageSetLSN(lpage, recptr); PageSetLSN(rootpage, recptr); PageSetLSN(metapg, recptr); } -- 2.40.0