From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Andres Freund <andres@anarazel.de>
Cc: Dmitry Dolgov <9erthalion6@gmail.com>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Cc: PostgreSQL mailing lists <pgsql-bugs@postgresql.org>
Subject: Re: LLVM jit and matview
Date: Wed, 25 Jul 2018 18:11:13 -0400
Message-ID: <20180725221113.q5bsc2qqnhbghxtt@alvherre.pgsql> (raw)
In-Reply-To: <20180725214702.6v7jxi2zkcv3exar@alap3.anarazel.de>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: alvherre@2ndquadrant.com, andres@anarazel.de, 9erthalion6@gmail.com, michael@paquier.xyz, pgsql-hackers@postgresql.org
Subject: Re: LLVM jit and matview
In-Reply-To: <20180725221113.q5bsc2qqnhbghxtt@alvherre.pgsql>
References: <20180725214702.6v7jxi2zkcv3exar@alap3.anarazel.de> <20180725221113.q5bsc2qqnhbghxtt@alvherre.pgsql>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox