]> granicus.if.org Git - postgresql/commit
Support Parallel Append plan nodes.
authorRobert Haas <rhaas@postgresql.org>
Tue, 5 Dec 2017 22:28:39 +0000 (17:28 -0500)
committerRobert Haas <rhaas@postgresql.org>
Tue, 5 Dec 2017 22:28:39 +0000 (17:28 -0500)
commitab72716778128fb63d54ac256adf7fe6820a1185
tree499c03ee0689719307ae780a4b66d49314ac2f41
parent8097d189ccc2cd55a8bf189bd21cb196e3cfc385
Support Parallel Append plan nodes.

When we create an Append node, we can spread out the workers over the
subplans instead of piling on to each subplan one at a time, which
should typically be a bit more efficient, both because the startup
cost of any plan executed entirely by one worker is paid only once and
also because of reduced contention.  We can also construct Append
plans using a mix of partial and non-partial subplans, which may allow
for parallelism in places that otherwise couldn't support it.
Unfortunately, this patch doesn't handle the important case of
parallelizing UNION ALL by running each branch in a separate worker;
the executor infrastructure is added here, but more planner work is
needed.

Amit Khandekar, Robert Haas, Amul Sul, reviewed and tested by
Ashutosh Bapat, Amit Langote, Rafia Sabih, Amit Kapila, and
Rajkumar Raghuwanshi.

Discussion: http://postgr.es/m/CAJ3gD9dy0K_E8r727heqXoBmWZ83HwLFwdcaSSmBQ1+S+vRuUQ@mail.gmail.com
31 files changed:
doc/src/sgml/config.sgml
doc/src/sgml/monitoring.sgml
src/backend/executor/execParallel.c
src/backend/executor/nodeAppend.c
src/backend/nodes/copyfuncs.c
src/backend/nodes/list.c
src/backend/nodes/outfuncs.c
src/backend/nodes/readfuncs.c
src/backend/optimizer/path/allpaths.c
src/backend/optimizer/path/costsize.c
src/backend/optimizer/path/joinrels.c
src/backend/optimizer/plan/createplan.c
src/backend/optimizer/plan/planner.c
src/backend/optimizer/prep/prepunion.c
src/backend/optimizer/util/pathnode.c
src/backend/storage/lmgr/lwlock.c
src/backend/utils/misc/guc.c
src/backend/utils/misc/postgresql.conf.sample
src/include/executor/nodeAppend.h
src/include/nodes/execnodes.h
src/include/nodes/pg_list.h
src/include/nodes/plannodes.h
src/include/nodes/relation.h
src/include/optimizer/cost.h
src/include/optimizer/pathnode.h
src/include/storage/lwlock.h
src/test/regress/expected/inherit.out
src/test/regress/expected/select_parallel.out
src/test/regress/expected/sysviews.out
src/test/regress/sql/inherit.sql
src/test/regress/sql/select_parallel.sql