aboutsummaryrefslogtreecommitdiff
path: root/src/backend/optimizer/path/costsize.c
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2016-06-09 09:08:27 -0400
committerRobert Haas <rhaas@postgresql.org>2016-06-09 10:00:26 -0400
commitc9ce4a1c61ebf39c03885cc19fe7c32edc04a300 (patch)
tree45fd8dd5e21154f735d29aa744b2cea5b6cda3eb /src/backend/optimizer/path/costsize.c
parent6581e930a8546a764e948ad429fc2e179fc38d09 (diff)
downloadpostgresql-c9ce4a1c61ebf39c03885cc19fe7c32edc04a300.tar.gz
postgresql-c9ce4a1c61ebf39c03885cc19fe7c32edc04a300.zip
Eliminate "parallel degree" terminology.
This terminology provoked widespread complaints. So, instead, rename the GUC max_parallel_degree to max_parallel_workers_per_gather (leaving room for a possible future GUC max_parallel_workers that acts as a system-wide limit), and rename the parallel_degree reloption to parallel_workers. Rename structure members to match. These changes create a dump/restore hazard for users of PostgreSQL 9.6beta1 who have set the reloption (or applied the GUC using ALTER USER or ALTER DATABASE).
Diffstat (limited to 'src/backend/optimizer/path/costsize.c')
-rw-r--r--src/backend/optimizer/path/costsize.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/backend/optimizer/path/costsize.c b/src/backend/optimizer/path/costsize.c
index b39c928eba1..e7f63f4faba 100644
--- a/src/backend/optimizer/path/costsize.c
+++ b/src/backend/optimizer/path/costsize.c
@@ -113,7 +113,7 @@ int effective_cache_size = DEFAULT_EFFECTIVE_CACHE_SIZE;
Cost disable_cost = 1.0e10;
-int max_parallel_degree = 2;
+int max_parallel_workers_per_gather = 2;
bool enable_seqscan = true;
bool enable_indexscan = true;
@@ -229,9 +229,9 @@ cost_seqscan(Path *path, PlannerInfo *root,
cpu_run_cost += path->pathtarget->cost.per_tuple * path->rows;
/* Adjust costing for parallelism, if used. */
- if (path->parallel_degree > 0)
+ if (path->parallel_workers > 0)
{
- double parallel_divisor = path->parallel_degree;
+ double parallel_divisor = path->parallel_workers;
double leader_contribution;
/*
@@ -245,7 +245,7 @@ cost_seqscan(Path *path, PlannerInfo *root,
* estimate that the leader spends 30% of its time servicing each
* worker, and the remainder executing the parallel plan.
*/
- leader_contribution = 1.0 - (0.3 * path->parallel_degree);
+ leader_contribution = 1.0 - (0.3 * path->parallel_workers);
if (leader_contribution > 0)
parallel_divisor += leader_contribution;