Re: Virtual tuple slots versus TOAST: big problem - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Virtual tuple slots versus TOAST: big problem
Date
Msg-id 28803.1132504847@sss.pgh.pa.us
Whole thread Raw
In response to Re: Virtual tuple slots versus TOAST: big problem  (Jan Wieck <JanWieck@Yahoo.com>)
List pgsql-hackers
Jan Wieck <JanWieck@Yahoo.com> writes:
> On 11/20/2005 11:23 AM, Tom Lane wrote:
> Assuming that the saved header values don't need to be recomputed if the 
> tuple doesn't need to be toasted at all, I think that toasting is 
> expensive enough so that recomputing those values is hardly noticed.

Yeah, probably so.  I'll just make the localized API change then.

One side effect of changing it as I suggest is that when control comes
back out of heap_insert/update, the caller will still have the
originally passed tuple and not the toasted version that actually went
to disk.  AFAICS this is OK (of course we have to make sure t_self and
other header fields are updated in both copies).  The main impact of
the change is that FormIndexDatum will receive the pre-toasting version
of the tuple, but that is actually a *good* thing --- right now, it just
has to fetch back untoasted fields anyway, if there's anything it needs
to do with them.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Jan Wieck
Date:
Subject: Re: Virtual tuple slots versus TOAST: big problem
Next
From: "Pavel Stehule"
Date:
Subject: Re: Returning multiple result sets