summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorTom Lane2007-11-16 19:53:50 +0000
committerTom Lane2007-11-16 19:53:50 +0000
commit93190c309802b9adb2aa56bfb8bb1ef1a6b8f93f (patch)
tree78a27cb633f2703912904403862f821f39ca9baf /src/include
parentbb4a78c0708805591cf0d53d13805ff01d9c4a0d (diff)
Repair still another bug in the btree page split WAL reduction patch:
it failed for splits of non-leaf pages because in such pages the first data key on a page is suppressed, and so we can't just copy the first key from the right page to reconstitute the left page's high key. Problem found by Koichi Suzuki, patch by Heikki.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/access/nbtree.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/include/access/nbtree.h b/src/include/access/nbtree.h
index 34041b8da3..31bea4e98f 100644
--- a/src/include/access/nbtree.h
+++ b/src/include/access/nbtree.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/access/nbtree.h,v 1.114 2007/11/15 21:14:42 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/access/nbtree.h,v 1.115 2007/11/16 19:53:50 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -289,8 +289,15 @@ typedef struct xl_btree_split
* than BlockNumber for alignment reasons: SizeOfBtreeSplit is only 16-bit
* aligned.)
*
+ * If level > 0, an IndexTuple representing the HIKEY of the left page
+ * follows. We don't need this on leaf pages, because it's the same
+ * as the leftmost key in the new right page. Also, it's suppressed if
+ * XLogInsert chooses to store the left page's whole page image.
+ *
* In the _L variants, next are OffsetNumber newitemoff and the new item.
* (In the _R variants, the new item is one of the right page's tuples.)
+ * The new item, but not newitemoff, is suppressed if XLogInsert chooses
+ * to store the left page's whole page image.
*
* Last are the right page's tuples in the form used by _bt_restore_page.
*/