]> granicus.if.org Git - postgresql/commit
Basic planner and executor integration for JIT.
authorAndres Freund <andres@anarazel.de>
Thu, 22 Mar 2018 18:45:07 +0000 (11:45 -0700)
committerAndres Freund <andres@anarazel.de>
Thu, 22 Mar 2018 18:51:58 +0000 (11:51 -0700)
commitcc415a56d09a8da7c919088036b6097b70f10791
treeb99cb7e66041f8533dc63c4a689cbf3f03956957
parent7ec0d80c0508eae35ac8e19d041f9ba1276de08e
Basic planner and executor integration for JIT.

This adds simple cost based plan time decision about whether JIT
should be performed. jit_above_cost, jit_optimize_above_cost are
compared with the total cost of a plan, and if the cost is above them
JIT is performed / optimization is performed respectively.

For that PlannedStmt and EState have a jitFlags (es_jit_flags) field
that stores information about what JIT operations should be performed.

EState now also has a new es_jit field, which can store a
JitContext. When there are no errors the context is released in
standard_ExecutorEnd().

It is likely that the default values for jit_[optimize_]above_cost
will need to be adapted further, but in my test these values seem to
work reasonably.

Author: Andres Freund, with feedback by Peter Eisentraut
Discussion: https://postgr.es/m/20170901064131.tazjxwus3k2w3ybh@alap3.anarazel.de
13 files changed:
src/backend/executor/execMain.c
src/backend/executor/execParallel.c
src/backend/executor/execUtils.c
src/backend/jit/jit.c
src/backend/nodes/copyfuncs.c
src/backend/nodes/outfuncs.c
src/backend/nodes/readfuncs.c
src/backend/optimizer/plan/planner.c
src/backend/utils/misc/guc.c
src/backend/utils/misc/postgresql.conf.sample
src/include/jit/jit.h
src/include/nodes/execnodes.h
src/include/nodes/plannodes.h