pgsql: Introduce a new GUC force_parallel_mode for testing purposes.

From: Robert Haas <rhaas(at)postgresql(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Introduce a new GUC force_parallel_mode for testing purposes.
Date: 2016-02-07 16:42:03
Message-ID: E1aSSPT-000809-Ui@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Introduce a new GUC force_parallel_mode for testing purposes.

When force_parallel_mode = true, we enable the parallel mode restrictions
for all queries for which this is believed to be safe. For the subset of
those queries believed to be safe to run entirely within a worker, we spin
up a worker and run the query there instead of running it in the
original process. When force_parallel_mode = regress, make additional
changes to allow the regression tests to run cleanly even though parallel
workers have been injected under the hood.

Taken together, this facilitates both better user testing and better
regression testing of the parallelism code.

Robert Haas, with help from Amit Kapila and Rushabh Lathia.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/7c944bd903392829608a9fba5b0e68c4fe89abf8

Modified Files
--------------
doc/src/sgml/config.sgml | 45 +++++++++++++++++
src/backend/access/transam/parallel.c | 4 +-
src/backend/commands/explain.c | 14 ++++-
src/backend/nodes/copyfuncs.c | 1 +
src/backend/nodes/outfuncs.c | 2 +
src/backend/nodes/readfuncs.c | 1 +
src/backend/optimizer/plan/createplan.c | 5 ++
src/backend/optimizer/plan/planner.c | 73 ++++++++++++++++++++-------
src/backend/utils/misc/guc.c | 24 +++++++++
src/backend/utils/misc/postgresql.conf.sample | 1 +
src/include/nodes/plannodes.h | 1 +
src/include/nodes/relation.h | 3 ++
src/include/optimizer/planmain.h | 9 ++++
13 files changed, 163 insertions(+), 20 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2016-02-07 16:46:17 pgsql: Fix parallel-safety markings for pg_upgrade functions.
Previous Message Robert Haas 2016-02-07 15:23:15 pgsql: Introduce group locking to prevent parallel processes from deadl