From: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
---|---|
To: | Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: es_query_dsa is broken |
Date: | 2017-12-05 12:24:41 |
Message-ID: | CAA4eK1+Z2h=8AxMDTkxypGOk9jkrczhN4ztYXNkh2t4f_w1XAA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Dec 5, 2017 at 6:45 AM, Thomas Munro
<thomas(dot)munro(at)enterprisedb(dot)com> wrote:
> On Thu, Nov 30, 2017 at 11:19 PM, Thomas Munro
> <thomas(dot)munro(at)enterprisedb(dot)com> wrote:
>> On Thu, Nov 30, 2017 at 4:01 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>>>
>>> In v10 we might need to go with a solution like what you've sketched
>>> here, because Tom will complain about breaking binary compatibility
>>> with EState (and maybe other PlanState nodes) in a released branch.
>
> Here's a pair of versions of that patch tidied up a bit, for
> REL_10_STABLE and master. Unfortunately I've been unable to come up
> with a reproducer that shows misbehaviour (something like what was
> reported on -bugs[1] which appears to be a case of calling
> dsa_get_address(wrong_area, some_dsa_pointer)).
>
+ 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)?
--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Raúl Marín Rodríguez | 2017-12-05 12:44:04 | Re: [HACKERS] pow support for pgbench |
Previous Message | Thomas Munro | 2017-12-05 11:53:22 | Re: [HACKERS] kqueue |