From: Tom Lane <tgl@sss.pgh.pa.us>
To: Bruce Momjian <bruce@momjian.us>
Cc: John Smith <sodgodofall@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Performance of aggregates over set-returning functions
Date: Thu, 06 Mar 2008 12:53:28 -0500
Message-ID: <18716.1204826008@sss.pgh.pa.us> (raw)
In-Reply-To: <200803061723.m26HNLN24410@momjian.us>
References: <200803061723.m26HNLN24410@momjian.us>
Bruce Momjian <bruce@momjian.us> writes:
> This this a bug or TODO item?
TODO, I think. I wouldn't want to risk pushing a change in this into
back branches.
regards, tom lane
>> I'm not sure why it's like this. Some digging in the CVS history shows
>> that indeed the code used to be in the other order, and I switched it
>> (and added the second comment block) in this old commit:
>>
>> http://archives.postgresql.org/pgsql-committers/2000-08/msg00218.php
>>
>> I suppose that the SQL-function support at the time required that its
>> calling memory context be persistent until it returned ExprEndResult,
>> but I sure don't recall any details. It's entirely possible that that
>> requirement no longer exists, or could easily be eliminated given all
>> the other changes that have happened since then. nodeFunctionscan.c
>> seems to reset the current context for each call of a SRF, so I'd think
>> that anything that can't cope with that should have been flushed out
>> by now.
>>
>> If you feel like poking at this, I *strongly* recommend doing your
>> testing in an --enable-cassert build. You'll have no idea whether you
>> freed stuff too early if you don't have CLOBBER_FREED_MEMORY enabled.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, bruce@momjian.us, sodgodofall@gmail.com
Subject: Re: Performance of aggregates over set-returning functions
In-Reply-To: <18716.1204826008@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox