summaryrefslogtreecommitdiff
path: root/src/include/access/nbtree.h
diff options
context:
space:
mode:
authorSimon Riggs <simon@2ndQuadrant.com>2010-03-19 10:41:22 +0000
committerSimon Riggs <simon@2ndQuadrant.com>2010-03-19 10:41:22 +0000
commit5c73ae17d18a424fe63c0a1d8b674e9f22800572 (patch)
tree7858e0c65cbe7995fec0c011918434a3395f098a /src/include/access/nbtree.h
parent2827516394ef7b536f67904f9115355f3f7443e9 (diff)
downloadpostgresql-5c73ae17d18a424fe63c0a1d8b674e9f22800572.tar.gz
Reset btpo.xact following recovery of btree delete page. Add btpo_xact
field into WAL record and reset it from there, rather than using FrozenTransactionId which can lead to some corner case bugs. Problem report and suggested route to a fix from Heikki, details by me.
Diffstat (limited to 'src/include/access/nbtree.h')
-rw-r--r--src/include/access/nbtree.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/include/access/nbtree.h b/src/include/access/nbtree.h
index 8b7c33e61f..eb96b2ad48 100644
--- a/src/include/access/nbtree.h
+++ b/src/include/access/nbtree.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/access/nbtree.h,v 1.130 2010/02/26 02:01:21 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/access/nbtree.h,v 1.131 2010/03/19 10:41:22 sriggs Exp $
*
*-------------------------------------------------------------------------
*/
@@ -375,7 +375,7 @@ typedef struct xl_btree_vacuum
* identifies the tuple removed from the parent page (note that we remove
* this tuple's downlink and the *following* tuple's key). Note we do not
* store any content for the deleted page --- it is just rewritten as empty
- * during recovery.
+ * during recovery, apart from resetting the btpo.xact.
*/
typedef struct xl_btree_delete_page
{
@@ -383,6 +383,7 @@ typedef struct xl_btree_delete_page
BlockNumber deadblk; /* child block being deleted */
BlockNumber leftblk; /* child block's left sibling, if any */
BlockNumber rightblk; /* child block's right sibling */
+ TransactionId btpo_xact; /* value of btpo.xact for use in recovery */
/* xl_btree_metadata FOLLOWS IF XLOG_BTREE_DELETE_PAGE_META */
} xl_btree_delete_page;