Excerpts from Tom Lane's message of mié oct 27 18:18:06 -0300 2010:
> I wrote:
> >> Heikki Linnakangas <heikki.linnakan...@enterprisedb.com> writes:
> >>> One simple idea is to keep a flag along with the executor state to 
> >>> indicate that the executor state is currently in use. Set it just before 
> >>> calling ExecEvalExpr, and reset afterwards. If the flag is already set 
> >>> in the beginning of exec_eval_simple_expr, we have recursed, and must 
> >>> create a new executor state.
> 
> >> Yeah, the same thought occurred to me in the shower this morning.
> >> I'm concerned about possible memory leakage during repeated recursion,
> >> but maybe that can be dealt with.
> 
> I spent quite a bit of time trying to deal with the memory-leakage
> problem without adding still more bookkeeping overhead.  It wasn't
> looking good, and then I had a sudden insight: if we see that the in-use
> flag is set, we can simply return FALSE from exec_eval_simple_expr.

I tried the original test cases that were handed to me (quite different
from what I submitted here) and they are fixed also.  Thanks.

-- 
Álvaro Herrera <alvhe...@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to