Re: HeapTupleData.t_self garbage values

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: HeapTupleData.t_self garbage values
Date: 2010-03-11 20:52:29
Message-ID: 27960.1268340749@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov> writes:
> Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Grittner 2010-03-11 21:01:36 Re: HeapTupleData.t_self garbage values
Previous Message Andrew Dunstan 2010-03-11 20:38:53 Re: [patch] build issues on Win32