]> granicus.if.org Git - postgresql/commitdiff
Fix bug in the new B-tree incomplete-split code.
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Tue, 22 Apr 2014 19:40:44 +0000 (22:40 +0300)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Tue, 22 Apr 2014 19:40:44 +0000 (22:40 +0300)
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

index 922412eef15987c7ad8906ac2e9136f52cc2fa24..48cb809a0f58a4dffd46481ea03bd7d8ff5efff6 100644 (file)
@@ -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);
        }