1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-30 11:03:19 +03:00

This patch wraps all accesses to t_xmin, t_cmin, t_xmax, and t_cmax in

HeapTupleHeaderData in setter and getter macros called
HeapTupleHeaderGetXmin, HeapTupleHeaderSetXmin etc.

It also introduces a "virtual" field xvac by defining
HeapTupleHeaderGetXvac and HeapTupleHeaderSetXvac.  Xvac is used by
VACUUM, in fact it is stored in t_cmin.

Manfred Koizar
This commit is contained in:
Bruce Momjian
2002-06-15 19:54:24 +00:00
parent 7882179994
commit 3c35face41
14 changed files with 312 additions and 246 deletions

View File

@ -31,7 +31,7 @@
* ENHANCEMENTS, OR MODIFICATIONS.
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/pl/tcl/pltcl.c,v 1.55 2002/05/24 21:04:34 tgl Exp $
* $Header: /cvsroot/pgsql/src/pl/tcl/pltcl.c,v 1.56 2002/06/15 19:54:24 momjian Exp $
*
**********************************************************************/
@ -987,8 +987,8 @@ compile_pltcl_function(Oid fn_oid, bool is_trigger)
prodesc = (pltcl_proc_desc *) Tcl_GetHashValue(hashent);
uptodate = (prodesc->fn_xmin == procTup->t_data->t_xmin &&
prodesc->fn_cmin == procTup->t_data->t_cmin);
uptodate = (prodesc->fn_xmin == HeapTupleHeaderGetXmin(procTup->t_data) &&
prodesc->fn_cmin == HeapTupleHeaderGetCmin(procTup->t_data));
if (!uptodate)
{
@ -1025,8 +1025,8 @@ compile_pltcl_function(Oid fn_oid, bool is_trigger)
elog(ERROR, "pltcl: out of memory");
MemSet(prodesc, 0, sizeof(pltcl_proc_desc));
prodesc->proname = strdup(internal_proname);
prodesc->fn_xmin = procTup->t_data->t_xmin;
prodesc->fn_cmin = procTup->t_data->t_cmin;
prodesc->fn_xmin = HeapTupleHeaderGetXmin(procTup->t_data);
prodesc->fn_cmin = HeapTupleHeaderGetCmin(procTup->t_data);
/************************************************************
* Lookup the pg_language tuple by Oid