Re: BUG #17871: JIT during postgresql_fdw remote_estimates EXPLAIN have very negatively effect on planning time

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: maxim.boguk@gmail.com, pgsql-bugs@lists.postgresql.org
Date: 2023-03-27T21:38:19Z
Lists: pgsql-bugs
Andres Freund <andres@anarazel.de> writes:
> On 2023-03-27 08:04:59 +0000, PG Bug reporting form wrote:
>> postgresql_fdw remote estimated  explain calls could trigger JIT compilation
>> on the remote side (why explain without analyze trying use JIT at all???),
>> and with partitioned tables it will lead to very slow planning.

> It should not trigger all of JIT, just generating the bitcode, but not
> optimizing / emitting it.

I was wondering if we could skip doing even that much when
EXEC_FLAG_EXPLAIN_ONLY is set.  Without a test case, though,
I'm not very sure where the jitter is getting reached.

			regards, tom lane