From: | Justin Pryzby <pryzby(at)telsasoft(dot)com> |
---|---|
To: | Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com> |
Cc: | David Rowley <dgrowleyml(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org, Andres Freund <andres(at)anarazel(dot)de> |
Subject: | Re: jit and explain nontext |
Date: | 2020-11-20 16:16:22 |
Message-ID: | 20201120161622.GI24784@telsasoft.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Nov 20, 2020 at 04:56:38PM +0100, Peter Eisentraut wrote:
> On 2020-10-17 21:21, Justin Pryzby wrote:
> > Added at:https://commitfest.postgresql.org/30/2766/
> >
> > diff --git a/src/backend/commands/explain.c b/src/backend/commands/explain.c
> > index 41317f1837..7345971507 100644
> > --- a/src/backend/commands/explain.c
> > +++ b/src/backend/commands/explain.c
> > @@ -839,7 +839,8 @@ ExplainPrintJIT(ExplainState *es, int jit_flags, JitInstrumentation *ji)
> > instr_time total_time;
> > /* don't print information if no JITing happened */
> > - if (!ji || ji->created_functions == 0)
> > + if (!ji || (ji->created_functions == 0 &&
> > + es->format == EXPLAIN_FORMAT_TEXT))
> > return;
> > /* calculate total time */
>
> Can you show an output example of where this patch makes a difference? Just
> from reading the description, I would expect some kind of additional
> JIT-related output from something like
>
> EXPLAIN (FORMAT YAML) SELECT 1;
It matters if it was planned with jit but executed without jit.
postgres=# DEALLOCATE p; SET jit=on; SET jit_above_cost=0; prepare p as select from generate_series(1,9); explain(format yaml) execute p; SET jit=off; explain(format yaml) execute p;
Patched shows this for both explains:
JIT: +
Functions: 3 +
Unpatched shows only in the first case.
--
Justin
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2020-11-20 16:23:44 | Re: [Patch] ALTER SYSTEM READ ONLY |
Previous Message | Robert Haas | 2020-11-20 16:09:35 | Re: VACUUM (DISABLE_PAGE_SKIPPING on) |