Re: SRF memory mgmt patch (was [HACKERS] Concern about

From: Joe Conway <mail(at)joeconway(dot)com>
To:
Cc: PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: SRF memory mgmt patch (was [HACKERS] Concern about
Date: 2002-08-30 18:51:43
Message-ID: 3D6FBEBF.4000005@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Joe Conway wrote:
> Joe Conway wrote:
>
>> I'm looking at this now. I suspect the easy fix is to remove
>> ExecClearTuple from per_MultiFuncCall, but I'll try to understand
>> what's going on first.
>>
>
> On second thought, *all* functions failing is what you expected, right
> Tom? I just changed TupleGetDatum() as we discussed:
>
> #define TupleGetDatum(_slot, _tuple) \
> PointerGetDatum(ExecStoreTuple(_tuple, _slot, InvalidBuffer, false))
>
> and now everything works again. Is this the preferred fix and/or is it
> worth spending more time to dig into this?

Here is a patch with the above mentioned fix. It also has an addition to
rangefuncs.sql and rangefuncs.out to ensure a C language table function
gets tested. I did this by adding
SELECT * FROM pg_settings WHERE name LIKE 'enable%';
to the test. I think this should produce reasonably stable results, but
obviously will require some maintenance if we add/remove a GUC variable
matching this criteria. Alternative suggestions welcomed, but if there
are no objections, please commit.

Thanks,

Joe

Attachment Content-Type Size
tablefunc-fix.1.patch text/plain 2.2 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Laurette Cisneros 2002-08-30 18:57:17 source code indexer
Previous Message Matthew T. OConnor 2002-08-30 18:43:38 Re: [HACKERS] pgaccess - where to store the own data

Browse pgsql-patches by date

  From Date Subject
Next Message Joe Conway 2002-08-30 19:05:34 update to contrib/dblink
Previous Message Joe Conway 2002-08-30 17:51:35 Re: SRF memory mgmt patch (was [HACKERS] Concern about