From: Tom Lane <tgl@sss.pgh.pa.us>
To: Mladen Gogala <gogala.mladen@gmail.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Interesting fail when migrating Pg from Ubuntu Bionic to Focal
Date: Fri, 04 Mar 2022 21:48:33 -0500
Message-ID: <4008273.1646448513@sss.pgh.pa.us> (raw)
In-Reply-To: <780e8797-b5a8-f02f-fbea-e01b625a34a7@gmail.com>
References: <20220303150428.GA26036@depesz.com>
<20220303151156.GB26036@depesz.com>
<20220303163921.GA10776@depesz.com>
<20220303164401.GA13056@depesz.com>
<3969790.1646420992@sss.pgh.pa.us>
<20220304204510.GA21340@depesz.com>
<3984384.1646431394@sss.pgh.pa.us>
<780e8797-b5a8-f02f-fbea-e01b625a34a7@gmail.com>
Mladen Gogala <gogala.mladen@gmail.com> writes:
> On 3/4/22 17:03, Tom Lane wrote:
>> Mmm ... it might have just been that the planner chose not to use
>> JIT when it thought there were fewer rows involved. Did you check
>> with EXPLAIN that these cut-down cases still used JIT?
> This is interesting and informative answer. How do I check whether JIT
> is used in the explain plan? Can you give me an example?
If EXPLAIN prints some stuff about JIT, then JIT is going to be
used, otherwise not. Here's an example from my (entirely
unsuccessful) attempts to duplicate depesz's problem:
=# explain select p.proname, (SELECT rolname from pg_catalog.pg_roles where oid = p.proowner) from pg_proc p;
QUERY PLAN
----------------------------------------------------------------------------------------------
Seq Scan on pg_proc p (cost=0.00..393587.22 rows=47243 width=128)
SubPlan 1
-> Index Scan using pg_authid_oid_index on pg_authid (cost=0.28..8.30 rows=1 width=64)
Index Cond: (oid = p.proowner)
JIT:
Functions: 8
Options: Inlining false, Optimization false, Expressions true, Deforming true
(7 rows)
regards, tom lane
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-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, gogala.mladen@gmail.com
Subject: Re: Interesting fail when migrating Pg from Ubuntu Bionic to Focal
In-Reply-To: <4008273.1646448513@sss.pgh.pa.us>
References: <20220303150428.GA26036@depesz.com> <20220303151156.GB26036@depesz.com> <20220303163921.GA10776@depesz.com> <20220303164401.GA13056@depesz.com> <3969790.1646420992@sss.pgh.pa.us> <20220304204510.GA21340@depesz.com> <3984384.1646431394@sss.pgh.pa.us> <780e8797-b5a8-f02f-fbea-e01b625a34a7@gmail.com> <4008273.1646448513@sss.pgh.pa.us>
* 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