From: Heikki Linnakangas Date: Tue, 22 Apr 2014 19:40:44 +0000 (+0300) Subject: Fix bug in the new B-tree incomplete-split code. X-Git-Tag: REL9_4_BETA1~132 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4a5d55ec2b711e13438a32d119a809a22ced410b;p=thirdparty%2Fpostgresql.git 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. --- diff --git a/src/backend/access/nbtree/nbtinsert.c b/src/backend/access/nbtree/nbtinsert.c index 922412eef15..48cb809a0f5 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); }