Re: Add parameter jit_warn_above_fraction - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Add parameter jit_warn_above_fraction
Date
Msg-id 20220330002030.fdfopirlsakhsg77@alap3.anarazel.de
Whole thread Raw
In response to Re: Add parameter jit_warn_above_fraction  (David Rowley <dgrowleyml@gmail.com>)
Responses Re: Add parameter jit_warn_above_fraction  (David Rowley <dgrowleyml@gmail.com>)
List pgsql-hackers
Hi,

On 2022-03-30 12:41:41 +1300, David Rowley wrote:
> On Wed, 30 Mar 2022 at 12:16, Andres Freund <andres@anarazel.de> wrote:
> > > I did propose a patch to address this in [1]. It does need more work
> > > and I do plan to come back to it for v16.
> >
> > FWIW, that doesn't seem quite right - won't it stop JITing e.g. on the inner
> > side of a nested loop, just because it's cheap, even though that's where the
> > bulk of the benefits comes from?
>
> Yeah, I think the total cost would need to be multiplied by the number
> of times we expect to call that part of the plan.  I've not yet sat
> down to figure out if that's easy/cheap or hard/costly information to
> obtain.

I wonder whether it'd make sense to combine that with awareness of a few plan
types that can lead to large portions of child nodes never being executed. One
the case where the current behaviour is the worst is runtime partition pruning
in append - we compile expressions for whole subtrees that will never be
executed. We should be much more hesitant to compile there compared to a
cheap-ish node that we know will be executed as part of a large expensive part
of the plan tree.

- Andres



pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: [PATCH] Full support for index LP_DEAD hint bits on standby
Next
From: "David G. Johnston"
Date:
Subject: Re: Temporary tables versus wraparound... again