From: | Andres Freund <andres(at)anarazel(dot)de> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Basic planner and executor integration for JIT. |
Date: | 2018-03-22 19:06:51 |
Message-ID: | E1ez5Y3-0008Ih-3T@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
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
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/cc415a56d09a8da7c919088036b6097b70f10791
Modified Files
--------------
src/backend/executor/execMain.c | 8 ++++++++
src/backend/executor/execParallel.c | 3 +++
src/backend/executor/execUtils.c | 3 +++
src/backend/jit/jit.c | 2 ++
src/backend/nodes/copyfuncs.c | 1 +
src/backend/nodes/outfuncs.c | 1 +
src/backend/nodes/readfuncs.c | 1 +
src/backend/optimizer/plan/planner.c | 15 +++++++++++++++
src/backend/utils/misc/guc.c | 20 ++++++++++++++++++++
src/backend/utils/misc/postgresql.conf.sample | 6 ++++++
src/include/jit/jit.h | 2 ++
src/include/nodes/execnodes.h | 8 ++++++++
src/include/nodes/plannodes.h | 2 ++
13 files changed, 72 insertions(+)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2018-03-22 19:47:52 | pgsql: Sync up our various ways of estimating pg_class.reltuples. |
Previous Message | Ildar Musin | 2018-03-22 18:52:48 | Re: pgsql: Add general purpose hasing functions to pgbench. |