Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pguXx-0006SL-MT for pgsql-bugs@arkaria.postgresql.org; Mon, 27 Mar 2023 21:38:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pguXw-0003SK-99 for pgsql-bugs@arkaria.postgresql.org; Mon, 27 Mar 2023 21:38:32 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pguXw-0003SA-13 for pgsql-bugs@lists.postgresql.org; Mon, 27 Mar 2023 21:38:32 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pguXp-0002QC-Hb for pgsql-bugs@lists.postgresql.org; Mon, 27 Mar 2023 21:38:30 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 32RLcJB03348300; Mon, 27 Mar 2023 17:38:19 -0400 From: Tom Lane To: Andres Freund cc: maxim.boguk@gmail.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #17871: JIT during postgresql_fdw remote_estimates EXPLAIN have very negatively effect on planning time In-reply-to: <20230327212830.dpp2u47je5ozf5q7@awork3.anarazel.de> References: <17871-16521a70c16cb83c@postgresql.org> <20230327212830.dpp2u47je5ozf5q7@awork3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Mon, 27 Mar 2023 14:28:30 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3348297.1679953099.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Mon, 27 Mar 2023 17:38:19 -0400 Message-ID: <3348298.1679953099@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Andres Freund writes: > On 2023-03-27 08:04:59 +0000, PG Bug reporting form wrote: >> postgresql_fdw remote estimated explain calls could trigger JIT compil= ation >> 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