diff options
| author | Andres Freund | 2018-10-03 19:48:37 +0000 |
|---|---|---|
| committer | Andres Freund | 2018-10-03 19:48:37 +0000 |
| commit | c03c1449c0925637d382bd16197796e6c5cab31d (patch) | |
| tree | 3501ee216b787fa81a20daa55a4c6f8f324c8bac /src/include | |
| parent | 595a0eab7f425e3484639fae1f7e221fe9c2651a (diff) | |
Fix issues around EXPLAIN with JIT.
I (Andres) was more than a bit hasty in committing 33001fd7a7072d48327
after last minute changes, leading to a number of problems (jit output
was only shown for JIT in parallel workers, and just EXPLAIN without
ANALYZE didn't work). Lukas luckily found these issues quickly.
Instead of combining instrumentation in in standard_ExecutorEnd(), do
so on demand in the new ExplainPrintJITSummary().
Also update a documentation example of the JIT output, changed in
52050ad8ebec8d831.
Author: Lukas Fittl, with minor changes by me
Discussion: https://postgr.es/m/CAP53PkxmgJht69pabxBXJBM+0oc6kf3KHMborLP7H2ouJ0CCtQ@mail.gmail.com
Backpatch: 11, where JIT compilation was introduced
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/commands/explain.h | 1 | ||||
| -rw-r--r-- | src/include/nodes/execnodes.h | 8 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/include/commands/explain.h b/src/include/commands/explain.h index b0b6f1e15a4..d3f70fda084 100644 --- a/src/include/commands/explain.h +++ b/src/include/commands/explain.h @@ -81,6 +81,7 @@ extern void ExplainOnePlan(PlannedStmt *plannedstmt, IntoClause *into, extern void ExplainPrintPlan(ExplainState *es, QueryDesc *queryDesc); extern void ExplainPrintTriggers(ExplainState *es, QueryDesc *queryDesc); +extern void ExplainPrintJITSummary(ExplainState *es, QueryDesc *queryDesc); extern void ExplainPrintJIT(ExplainState *es, int jit_flags, struct JitInstrumentation *jit_instr, int worker_i); diff --git a/src/include/nodes/execnodes.h b/src/include/nodes/execnodes.h index 03ad5169762..020ecdcd404 100644 --- a/src/include/nodes/execnodes.h +++ b/src/include/nodes/execnodes.h @@ -570,13 +570,13 @@ typedef struct EState * and with which options. es_jit is created on-demand when JITing is * performed. * - * es_jit_combined_instr, at the end of query execution with - * instrumentation enabled, is the the combined instrumentation - * information of leader and followers. + * es_jit_combined_instr is the the combined, on demand allocated, + * instrumentation from all workers. The leader's instrumentation is kept + * separate, and is combined on demand by ExplainPrintJITSummary(). */ int es_jit_flags; struct JitContext *es_jit; - struct JitInstrumentation *es_jit_combined_instr; + struct JitInstrumentation *es_jit_worker_instr; } EState; |
