1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-25 20:23:07 +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

@@ -33,7 +33,7 @@
* ENHANCEMENTS, OR MODIFICATIONS.
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/pl/plperl/plperl.c,v 1.30 2002/05/05 00:03:29 tgl Exp $
* $Header: /cvsroot/pgsql/src/pl/plperl/plperl.c,v 1.31 2002/06/15 19:54:24 momjian Exp $
*
**********************************************************************/
@@ -552,8 +552,8 @@ compile_plperl_function(Oid fn_oid, bool is_trigger)
* This is needed because CREATE OR REPLACE FUNCTION can modify the
* function's pg_proc entry without changing its OID.
************************************************************/
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)
{
@@ -586,8 +586,8 @@ compile_plperl_function(Oid fn_oid, bool is_trigger)
elog(ERROR, "plperl: out of memory");
MemSet(prodesc, 0, sizeof(plperl_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