Re: crash in plancache with subtransactions

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: crash in plancache with subtransactions
Date: 2010-10-29 15:40:47
Message-ID: 1288366783-sup-3609@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Excerpts from Tom Lane's message of mié oct 27 18:18:06 -0300 2010:
> I wrote:
> >> Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)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 <alvherre(at)commandprompt(dot)com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Leonardo Francalanci 2010-10-29 15:41:18 Re: plan time of MASSIVE partitioning ...
Previous Message David Fetter 2010-10-29 15:33:00 Re: Tab completion for view triggers in psql