From c398300330cb3060d50652800dbd12729ab9f5ef Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Fri, 9 Feb 2007 03:35:35 +0000 Subject: 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. --- src/backend/access/transam/xact.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/backend/access/transam/xact.c') diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c index 26a3c5ddc2..ab8b5fd8b4 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); -- cgit v1.2.1