Re: es_query_dsa is broken

Поиск
Список
Период
Сортировка
От Amit Kapila
Тема Re: es_query_dsa is broken
Дата
Msg-id CAA4eK1+LO+Sts5VUS0D2Qy6eA6+D7Ywu2EA_pWMTPaPB2GaDsA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: es_query_dsa is broken  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: es_query_dsa is broken  (Thomas Munro <thomas.munro@enterprisedb.com>)
Список pgsql-hackers
On Wed, Dec 6, 2017 at 1:14 AM, Robert Haas <robertmhaas@gmail.com> wrote:
> On Tue, Dec 5, 2017 at 7:24 AM, Amit Kapila <amit.kapila16@gmail.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.
>

That's right.  Ignore my comment, I got confused.   Other than that, I
don't see any problem with the code as such apart from that it looks
slightly hacky.  I think Thomas or someone needs to develop a patch on
the lines you have mentioned or what Thomas was trying to describe in
his email and see how it comes out.

-- 
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com


В списке pgsql-hackers по дате отправления:

Предыдущее
От: David Rowley
Дата:
Сообщение: Re: [HACKERS] Runtime Partition Pruning
Следующее
От: Andres Freund
Дата:
Сообщение: fixed tuple descs (was JIT compiling expressions/deform)