diff options
| author | Tom Lane <tgl@sss.pgh.pa.us> | 2007-02-09 03:35:35 +0000 |
|---|---|---|
| committer | Tom Lane <tgl@sss.pgh.pa.us> | 2007-02-09 03:35:35 +0000 |
| commit | c398300330cb3060d50652800dbd12729ab9f5ef (patch) | |
| tree | 53d16880d6a38ffe3f6ddd125d644e1e984d14d1 /src/pl/tcl/pltcl.c | |
| parent | acb3416686d44885b6f7d40daacb8e4c1a28e366 (diff) | |
| download | postgresql-c398300330cb3060d50652800dbd12729ab9f5ef.tar.gz | |
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/pl/tcl/pltcl.c')
| -rw-r--r-- | src/pl/tcl/pltcl.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pl/tcl/pltcl.c b/src/pl/tcl/pltcl.c index 7611fa7cc7..0477fa8c56 100644 --- a/src/pl/tcl/pltcl.c +++ b/src/pl/tcl/pltcl.c @@ -2,7 +2,7 @@ * pltcl.c - PostgreSQL support for Tcl as * procedural language (PL) * - * $PostgreSQL: pgsql/src/pl/tcl/pltcl.c,v 1.109 2007/02/01 19:10:30 momjian Exp $ + * $PostgreSQL: pgsql/src/pl/tcl/pltcl.c,v 1.110 2007/02/09 03:35:35 tgl Exp $ * **********************************************************************/ @@ -76,7 +76,7 @@ typedef struct pltcl_proc_desc { char *proname; TransactionId fn_xmin; - CommandId fn_cmin; + ItemPointerData fn_tid; bool fn_readonly; bool lanpltrusted; FmgrInfo result_in_func; @@ -962,7 +962,7 @@ compile_pltcl_function(Oid fn_oid, Oid tgreloid) prodesc = (pltcl_proc_desc *) Tcl_GetHashValue(hashent); uptodate = (prodesc->fn_xmin == HeapTupleHeaderGetXmin(procTup->t_data) && - prodesc->fn_cmin == HeapTupleHeaderGetCmin(procTup->t_data)); + ItemPointerEquals(&prodesc->fn_tid, &procTup->t_self)); if (!uptodate) { @@ -1004,7 +1004,7 @@ compile_pltcl_function(Oid fn_oid, Oid tgreloid) MemSet(prodesc, 0, sizeof(pltcl_proc_desc)); prodesc->proname = strdup(internal_proname); prodesc->fn_xmin = HeapTupleHeaderGetXmin(procTup->t_data); - prodesc->fn_cmin = HeapTupleHeaderGetCmin(procTup->t_data); + prodesc->fn_tid = procTup->t_self; /* Remember if function is STABLE/IMMUTABLE */ prodesc->fn_readonly = |
