Re: LLVM jit and matview

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: LLVM jit and matview
Дата
Msg-id 20180725221113.q5bsc2qqnhbghxtt@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: LLVM jit and matview  (Andres Freund <andres@anarazel.de>)
Ответы Re: LLVM jit and matview  (Andres Freund <andres@anarazel.de>)
Re: LLVM jit and matview  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
On 2018-Jul-25, Andres Freund wrote:

> The fix is easy, releasing the JIT context should just happen in
> FreeExecutorState(). Only thing is that that function has the following
> comment in the header:
>  * Note: this is not responsible for releasing non-memory resources,
>  * such as open relations or buffer pins.  But it will shut down any
>  * still-active ExprContexts within the EState.  That is sufficient
>  * cleanup for situations where the EState has only been used for expression
>  * evaluation, and not to run a complete Plan.
> 
> I don't really think throwing away functions is a violation of that, but
> I think it's possible to argue the other way?

I suppose the other possible way about it is to say estate->es_jit in a
local variable so that you can call it after FreeExecutorState.  But
what would be the advantage of avoiding the context release inside
FreeExecutorState?  It seems pretty appropriate to me to do it there.
You could argue that the JIT context is definitely part of the estate
being freed.  Just amend the comment, no?

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


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

Предыдущее
От: Simon Muller
Дата:
Сообщение: Re: Allow COPY's 'text' format to output a header
Следующее
От: Andres Freund
Дата:
Сообщение: Re: LLVM jit and matview