Re: some last patches breaks plan cache - Mailing list pgsql-hackers

From Tom Lane
Subject Re: some last patches breaks plan cache
Date
Msg-id 22571.1522864499@sss.pgh.pa.us
Whole thread Raw
In response to Re: some last patches breaks plan cache  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Responses Re: some last patches breaks plan cache  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
List pgsql-hackers
Tomas Vondra <tomas.vondra@2ndquadrant.com> writes:
> This should do the trick - I've failed to realize exec_stmt_call may
> exit by calling elog(ERROR) too, in which case the plan pointer was not
> reset.

> This does fix the failures presented here, but I don't think it's the
> right solution

No, it's completely unacceptable.

If there's really no other way, you could use a PG_TRY block to ensure
that the pointer gets reset on the way out.  But I question why we've
got a design that requires that in the first place.  It's likely to
have more problems than this.

            regards, tom lane


pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: SET TRANSACTION in PL/pgSQL
Next
From: Tomas Vondra
Date:
Subject: Re: some last patches breaks plan cache