Re: es_query_dsa is broken

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: es_query_dsa is broken
Date: 2017-12-05 19:44:27
Message-ID: CA+TgmoYQAaH-wV1YB3SxNTTbR5y2UUNA+_C1=Q=8jwxOw30juA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Dec 5, 2017 at 7:24 AM, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
> + EState *estate = gatherstate->ps.state;
> +
> + /* Install our DSA area while executing the plan. */
> + estate->es_query_dsa = gatherstate->pei->area;
> outerTupleSlot = ExecProcNode(outerPlan);
> + estate->es_query_dsa = NULL;
>
> Won't the above coding pattern create a problem, if ExecProcNode
> throws an error and outer block catches it and continues execution
> (consider the case of execution inside PL blocks)?

I don't see what the problem is. The query that got aborted by the
error wouldn't be sharing an EState with one that didn't. Control
would have to return to someplace inside the same ExecProcNode and it
would have to return normally.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2017-12-05 19:48:32 Re: [HACKERS] pow support for pgbench
Previous Message Robert Haas 2017-12-05 19:40:34 Re: explain analyze output with parallel workers - question about meaning of information for explain.depesz.com