Re: HeapTupleData.t_self garbage values - Mailing list pgsql-hackers

From Tom Lane
Subject Re: HeapTupleData.t_self garbage values
Date
Msg-id 27960.1268340749@sss.pgh.pa.us
Whole thread Raw
In response to Re: HeapTupleData.t_self garbage values  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Responses Re: HeapTupleData.t_self garbage values
List pgsql-hackers
"Kevin Grittner" <Kevin.Grittner@wicourts.gov> writes:
> Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> ItemPointerSetInvalid(&(tuple.t_self));
> Aren't those tuples pointing to a disk buffer?

Oh, I should have looked at the code before commenting ;-).

Yeah, the correct TID value would be ItemPointerGetBlockNumber(tid)
plus the current offnum.  However we don't have enough information
in this function to set t_tableOid correctly, so maybe it would be
best to just set both fields invalid.  Or do nothing --- AFAICS none
of the uses of the heapTuple look at those fields.  Is it worth a few
extra cycles to initialize unused fields of a short-lived heapTuple?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: [patch] build issues on Win32
Next
From: "Kevin Grittner"
Date:
Subject: Re: HeapTupleData.t_self garbage values