Re: update on TOAST status' - Mailing list pgsql-hackers

From Tom Lane
Subject Re: update on TOAST status'
Date
Msg-id 11882.963363902@sss.pgh.pa.us
Whole thread Raw
In response to Re: update on TOAST status'  (JanWieck@t-online.de (Jan Wieck))
List pgsql-hackers
JanWieck@t-online.de (Jan Wieck) writes:
>> (We might need to avoid leaks in the comparison routines that are used
>> for indexes, but otherwise I think this scheme will work comfortably.)

>     That sounds bad. At least not very good.

>     So we better add a PG_FREEARG_xxx(ptr, argno) macro that does
>     the pfree if the pointer is different from  the  one  in  the
>     argument.

Yes, I already borrowed that idea from your original code.  I don't
like it a whole lot, but as long as the need for it is confined to
the indexable comparison operators I think we can tolerate it.

The alternative is to hack up the index search routines (and also
tuplesort.c, and perhaps other places?) to maintain a short-term memory
context for evaluating comparison operators, and reset said context
fairly frequently.  That might be doable but I haven't yet looked into
what it would take.

I'm hoping to commit what I have this evening...
        regards, tom lane


pgsql-hackers by date:

Previous
From: Andrew McMillan
Date:
Subject: Re: [GENERAL] Slashdot discussion
Next
From: Chris Bitmead
Date:
Subject: Re: postgres 7.2 features.