summaryrefslogtreecommitdiff
path: root/src/backend/access/transam/xact.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2007-02-09 03:35:35 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2007-02-09 03:35:35 +0000
commitc398300330cb3060d50652800dbd12729ab9f5ef (patch)
tree53d16880d6a38ffe3f6ddd125d644e1e984d14d1 /src/backend/access/transam/xact.c
parentacb3416686d44885b6f7d40daacb8e4c1a28e366 (diff)
Combine cmin and cmax fields of HeapTupleHeaders into a single field, by
keeping private state in each backend that has inserted and deleted the same tuple during its current top-level transaction. This is sufficient since there is no need to be able to determine the cmin/cmax from any other transaction. This gets us back down to 23-byte headers, removing a penalty paid in 8.0 to support subtransactions. Patch by Heikki Linnakangas, with minor revisions by moi, following a design hashed out awhile back on the pghackers list.
Diffstat (limited to 'src/backend/access/transam/xact.c')
-rw-r--r--src/backend/access/transam/xact.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c
index 26a3c5ddc2c..ab8b5fd8b4e 100644
--- a/src/backend/access/transam/xact.c
+++ b/src/backend/access/transam/xact.c
@@ -10,7 +10,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/access/transam/xact.c,v 1.233 2007/02/07 23:11:29 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/access/transam/xact.c,v 1.234 2007/02/09 03:35:33 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -38,11 +38,12 @@
#include "storage/lmgr.h"
#include "storage/procarray.h"
#include "storage/smgr.h"
+#include "utils/combocid.h"
#include "utils/flatfiles.h"
+#include "utils/guc.h"
#include "utils/inval.h"
#include "utils/memutils.h"
#include "utils/relcache.h"
-#include "utils/guc.h"
/*
@@ -1628,6 +1629,7 @@ CommitTransaction(void)
AtEOXact_Namespace(true);
/* smgrcommit already done */
AtEOXact_Files();
+ AtEOXact_ComboCid();
pgstat_clear_snapshot();
pgstat_count_xact_commit();
pgstat_report_txn_timestamp(0);
@@ -1845,6 +1847,7 @@ PrepareTransaction(void)
AtEOXact_Namespace(true);
/* smgrcommit already done */
AtEOXact_Files();
+ AtEOXact_ComboCid();
pgstat_clear_snapshot();
CurrentResourceOwner = NULL;
@@ -1997,6 +2000,7 @@ AbortTransaction(void)
AtEOXact_Namespace(false);
smgrabort();
AtEOXact_Files();
+ AtEOXact_ComboCid();
pgstat_clear_snapshot();
pgstat_count_xact_rollback();
pgstat_report_txn_timestamp(0);