Re: GIST and TOAST

From: Andrew - Supernews <andrew+nonews(at)supernews(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: GIST and TOAST
Date: 2007-03-06 14:53:15
Message-ID: slrneur02r.t59.andrew+nonews@atlantis.supernews.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2007-03-06, Gregory Stark <stark(at)enterprisedb(dot)com> wrote:
> "Teodor Sigaev" <teodor(at)sigaev(dot)ru> writes:
>>> A closer reading, however, shows that at least for cases like intarray,
>>> btree_gist, etc., the detoasting of an index value is being done in the
>>> gist decompress function, so the value seen via GISTENTRY in the other
>>> functions should already have been detoasted once.
>>
>> Right, any stored value form index should be decompressed by GiST decompress
>> support method.
>
> The problem is that this is the only place in the code where we make wholesale
> assumptions that a datum that comes from a tuple (heap tuple or index tuple)
> isn't toasted.

The places in the intarray code that you tried to "fix" in your patch at
the start of this thread are not dealing with data that came from a tuple,
but from data that came from a decompress method. It's expected that the
decompress method does the detoasting.

So I think you've mis-analyzed the problem. That's especially true since
you are claiming that the existing code is already buggy when in fact no
such bugs have been reported (and clearly intarray has been running with
toasted array values for years).

--
Andrew, Supernews
http://www.supernews.com - individual and corporate NNTP services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2007-03-06 15:02:34 Re: Aggressive freezing in lazy-vacuum
Previous Message NikhilS 2007-03-06 14:13:58 Re: Auto creation of Partitions