Fix issues around EXPLAIN with JIT.
authorAndres Freund <andres@anarazel.de>
Wed, 3 Oct 2018 19:48:37 +0000 (12:48 -0700)
committerAndres Freund <andres@anarazel.de>
Wed, 3 Oct 2018 19:48:37 +0000 (12:48 -0700)
commitc03c1449c0925637d382bd16197796e6c5cab31d
tree3501ee216b787fa81a20daa55a4c6f8f324c8bac
parent595a0eab7f425e3484639fae1f7e221fe9c2651a
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
doc/src/sgml/jit.sgml
src/backend/commands/explain.c
src/backend/executor/execMain.c
src/backend/executor/execParallel.c
src/include/commands/explain.h
src/include/nodes/execnodes.h