From c03c1449c0925637d382bd16197796e6c5cab31d Mon Sep 17 00:00:00 2001 From: Andres Freund Date: Wed, 3 Oct 2018 12:48:37 -0700 Subject: 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 --- contrib/auto_explain/auto_explain.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'contrib/auto_explain/auto_explain.c') diff --git a/contrib/auto_explain/auto_explain.c b/contrib/auto_explain/auto_explain.c index a19c1d2a3c3..646cd0d42cd 100644 --- a/contrib/auto_explain/auto_explain.c +++ b/contrib/auto_explain/auto_explain.c @@ -363,8 +363,7 @@ explain_ExecutorEnd(QueryDesc *queryDesc) if (es->analyze && auto_explain_log_triggers) ExplainPrintTriggers(es, queryDesc); if (es->costs) - ExplainPrintJIT(es, queryDesc->estate->es_jit_flags, - queryDesc->estate->es_jit_combined_instr, -1); + ExplainPrintJITSummary(es, queryDesc); ExplainEndOutput(es); /* Remove last line break */ -- cgit v1.2.3