diff options
Diffstat (limited to 'src/backend/optimizer')
-rw-r--r-- | src/backend/optimizer/path/allpaths.c | 34 | ||||
-rw-r--r-- | src/backend/optimizer/path/costsize.c | 8 | ||||
-rw-r--r-- | src/backend/optimizer/plan/createplan.c | 2 | ||||
-rw-r--r-- | src/backend/optimizer/plan/planner.c | 6 | ||||
-rw-r--r-- | src/backend/optimizer/util/pathnode.c | 86 | ||||
-rw-r--r-- | src/backend/optimizer/util/plancat.c | 4 | ||||
-rw-r--r-- | src/backend/optimizer/util/relnode.c | 2 |
7 files changed, 71 insertions, 71 deletions
diff --git a/src/backend/optimizer/path/allpaths.c b/src/backend/optimizer/path/allpaths.c index 873a7647748..546a01da5cb 100644 --- a/src/backend/optimizer/path/allpaths.c +++ b/src/backend/optimizer/path/allpaths.c @@ -669,26 +669,26 @@ set_plain_rel_pathlist(PlannerInfo *root, RelOptInfo *rel, RangeTblEntry *rte) static void create_plain_partial_paths(PlannerInfo *root, RelOptInfo *rel) { - int parallel_degree = 1; + int parallel_workers = 1; /* - * If the user has set the parallel_degree reloption, we decide what to do + * If the user has set the parallel_workers reloption, we decide what to do * based on the value of that option. Otherwise, we estimate a value. */ - if (rel->rel_parallel_degree != -1) + if (rel->rel_parallel_workers != -1) { /* - * If parallel_degree = 0 is set for this relation, bail out. The + * If parallel_workers = 0 is set for this relation, bail out. The * user does not want a parallel path for this relation. */ - if (rel->rel_parallel_degree == 0) + if (rel->rel_parallel_workers == 0) return; /* - * Use the table parallel_degree, but don't go further than - * max_parallel_degree. + * Use the table parallel_workers, but don't go further than + * max_parallel_workers_per_gather. */ - parallel_degree = Min(rel->rel_parallel_degree, max_parallel_degree); + parallel_workers = Min(rel->rel_parallel_workers, max_parallel_workers_per_gather); } else { @@ -711,9 +711,9 @@ create_plain_partial_paths(PlannerInfo *root, RelOptInfo *rel) * sophisticated, but we need something here for now. */ while (rel->pages > parallel_threshold * 3 && - parallel_degree < max_parallel_degree) + parallel_workers < max_parallel_workers_per_gather) { - parallel_degree++; + parallel_workers++; parallel_threshold *= 3; if (parallel_threshold >= PG_INT32_MAX / 3) break; @@ -721,7 +721,7 @@ create_plain_partial_paths(PlannerInfo *root, RelOptInfo *rel) } /* Add an unordered partial path based on a parallel sequential scan. */ - add_partial_path(rel, create_seqscan_path(root, rel, NULL, parallel_degree)); + add_partial_path(rel, create_seqscan_path(root, rel, NULL, parallel_workers)); } /* @@ -1242,11 +1242,11 @@ set_append_rel_pathlist(PlannerInfo *root, RelOptInfo *rel, { AppendPath *appendpath; ListCell *lc; - int parallel_degree = 0; + int parallel_workers = 0; /* - * Decide what parallel degree to request for this append path. For - * now, we just use the maximum parallel degree of any member. It + * Decide on the numebr of workers to request for this append path. For + * now, we just use the maximum value from among the members. It * might be useful to use a higher number if the Append node were * smart enough to spread out the workers, but it currently isn't. */ @@ -1254,13 +1254,13 @@ set_append_rel_pathlist(PlannerInfo *root, RelOptInfo *rel, { Path *path = lfirst(lc); - parallel_degree = Max(parallel_degree, path->parallel_degree); + parallel_workers = Max(parallel_workers, path->parallel_workers); } - Assert(parallel_degree > 0); + Assert(parallel_workers > 0); /* Generate a partial append path. */ appendpath = create_append_path(rel, partial_subpaths, NULL, - parallel_degree); + parallel_workers); add_partial_path(rel, (Path *) appendpath); } 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; diff --git a/src/backend/optimizer/plan/createplan.c b/src/backend/optimizer/plan/createplan.c index bd19f43d586..52df17fe694 100644 --- a/src/backend/optimizer/plan/createplan.c +++ b/src/backend/optimizer/plan/createplan.c @@ -1394,7 +1394,7 @@ create_gather_plan(PlannerInfo *root, GatherPath *best_path) gather_plan = make_gather(tlist, NIL, - best_path->path.parallel_degree, + best_path->path.parallel_workers, best_path->single_copy, subplan); diff --git a/src/backend/optimizer/plan/planner.c b/src/backend/optimizer/plan/planner.c index b1554cb8390..ba0c0ecae9c 100644 --- a/src/backend/optimizer/plan/planner.c +++ b/src/backend/optimizer/plan/planner.c @@ -245,7 +245,7 @@ standard_planner(Query *parse, int cursorOptions, ParamListInfo boundParams) glob->parallelModeOK = (cursorOptions & CURSOR_OPT_PARALLEL_OK) != 0 && IsUnderPostmaster && dynamic_shared_memory_type != DSM_IMPL_NONE && parse->commandType == CMD_SELECT && !parse->hasModifyingCTE && - parse->utilityStmt == NULL && max_parallel_degree > 0 && + parse->utilityStmt == NULL && max_parallel_workers_per_gather > 0 && !IsParallelWorker() && !IsolationIsSerializable() && !has_parallel_hazard((Node *) parse, true); @@ -3622,7 +3622,7 @@ create_grouping_paths(PlannerInfo *root, if (grouped_rel->partial_pathlist) { Path *path = (Path *) linitial(grouped_rel->partial_pathlist); - double total_groups = path->rows * path->parallel_degree; + double total_groups = path->rows * path->parallel_workers; path = (Path *) create_gather_path(root, grouped_rel, @@ -3717,7 +3717,7 @@ create_grouping_paths(PlannerInfo *root, if (hashaggtablesize < work_mem * 1024L) { - double total_groups = path->rows * path->parallel_degree; + double total_groups = path->rows * path->parallel_workers; path = (Path *) create_gather_path(root, grouped_rel, diff --git a/src/backend/optimizer/util/pathnode.c b/src/backend/optimizer/util/pathnode.c index 6182b362a3a..6b57de350d0 100644 --- a/src/backend/optimizer/util/pathnode.c +++ b/src/backend/optimizer/util/pathnode.c @@ -941,7 +941,7 @@ add_partial_path_precheck(RelOptInfo *parent_rel, Cost total_cost, */ Path * create_seqscan_path(PlannerInfo *root, RelOptInfo *rel, - Relids required_outer, int parallel_degree) + Relids required_outer, int parallel_workers) { Path *pathnode = makeNode(Path); @@ -950,9 +950,9 @@ create_seqscan_path(PlannerInfo *root, RelOptInfo *rel, pathnode->pathtarget = rel->reltarget; pathnode->param_info = get_baserel_parampathinfo(root, rel, required_outer); - pathnode->parallel_aware = parallel_degree > 0 ? true : false; + pathnode->parallel_aware = parallel_workers > 0 ? true : false; pathnode->parallel_safe = rel->consider_parallel; - pathnode->parallel_degree = parallel_degree; + pathnode->parallel_workers = parallel_workers; pathnode->pathkeys = NIL; /* seqscan has unordered result */ cost_seqscan(pathnode, root, rel, pathnode->param_info); @@ -976,7 +976,7 @@ create_samplescan_path(PlannerInfo *root, RelOptInfo *rel, Relids required_outer required_outer); pathnode->parallel_aware = false; pathnode->parallel_safe = rel->consider_parallel; - pathnode->parallel_degree = 0; + pathnode->parallel_workers = 0; pathnode->pathkeys = NIL; /* samplescan has unordered result */ cost_samplescan(pathnode, root, rel, pathnode->param_info); @@ -1033,7 +1033,7 @@ create_index_path(PlannerInfo *root, required_outer); pathnode->path.parallel_aware = false; pathnode->path.parallel_safe = rel->consider_parallel; - pathnode->path.parallel_degree = 0; + pathnode->path.parallel_workers = 0; pathnode->path.pathkeys = pathkeys; /* Convert clauses to indexquals the executor can handle */ @@ -1082,7 +1082,7 @@ create_bitmap_heap_path(PlannerInfo *root, required_outer); pathnode->path.parallel_aware = false; pathnode->path.parallel_safe = rel->consider_parallel; - pathnode->path.parallel_degree = 0; + pathnode->path.parallel_workers = 0; pathnode->path.pathkeys = NIL; /* always unordered */ pathnode->bitmapqual = bitmapqual; @@ -1118,7 +1118,7 @@ create_bitmap_and_path(PlannerInfo *root, */ pathnode->path.parallel_aware = false; pathnode->path.parallel_safe = rel->consider_parallel; - pathnode->path.parallel_degree = 0; + pathnode->path.parallel_workers = 0; pathnode->path.pathkeys = NIL; /* always unordered */ @@ -1154,7 +1154,7 @@ create_bitmap_or_path(PlannerInfo *root, */ pathnode->path.parallel_aware = false; pathnode->path.parallel_safe = rel->consider_parallel; - pathnode->path.parallel_degree = 0; + pathnode->path.parallel_workers = 0; pathnode->path.pathkeys = NIL; /* always unordered */ @@ -1183,7 +1183,7 @@ create_tidscan_path(PlannerInfo *root, RelOptInfo *rel, List *tidquals, required_outer); pathnode->path.parallel_aware = false; pathnode->path.parallel_safe = rel->consider_parallel; - pathnode->path.parallel_degree = 0; + pathnode->path.parallel_workers = 0; pathnode->path.pathkeys = NIL; /* always unordered */ pathnode->tidquals = tidquals; @@ -1203,7 +1203,7 @@ create_tidscan_path(PlannerInfo *root, RelOptInfo *rel, List *tidquals, */ AppendPath * create_append_path(RelOptInfo *rel, List *subpaths, Relids required_outer, - int parallel_degree) + int parallel_workers) { AppendPath *pathnode = makeNode(AppendPath); ListCell *l; @@ -1215,7 +1215,7 @@ create_append_path(RelOptInfo *rel, List *subpaths, Relids required_outer, required_outer); pathnode->path.parallel_aware = false; pathnode->path.parallel_safe = rel->consider_parallel; - pathnode->path.parallel_degree = parallel_degree; + pathnode->path.parallel_workers = parallel_workers; pathnode->path.pathkeys = NIL; /* result is always considered * unsorted */ pathnode->subpaths = subpaths; @@ -1274,7 +1274,7 @@ create_merge_append_path(PlannerInfo *root, required_outer); pathnode->path.parallel_aware = false; pathnode->path.parallel_safe = rel->consider_parallel; - pathnode->path.parallel_degree = 0; + pathnode->path.parallel_workers = 0; pathnode->path.pathkeys = pathkeys; pathnode->subpaths = subpaths; @@ -1357,7 +1357,7 @@ create_result_path(PlannerInfo *root, RelOptInfo *rel, pathnode->path.param_info = NULL; /* there are no other rels... */ pathnode->path.parallel_aware = false; pathnode->path.parallel_safe = rel->consider_parallel; - pathnode->path.parallel_degree = 0; + pathnode->path.parallel_workers = 0; pathnode->path.pathkeys = NIL; pathnode->quals = resconstantqual; @@ -1398,7 +1398,7 @@ create_material_path(RelOptInfo *rel, Path *subpath) pathnode->path.parallel_aware = false; pathnode->path.parallel_safe = rel->consider_parallel && subpath->parallel_safe; - pathnode->path.parallel_degree = subpath->parallel_degree; + pathnode->path.parallel_workers = subpath->parallel_workers; pathnode->path.pathkeys = subpath->pathkeys; pathnode->subpath = subpath; @@ -1463,7 +1463,7 @@ create_unique_path(PlannerInfo *root, RelOptInfo *rel, Path *subpath, pathnode->path.parallel_aware = false; pathnode->path.parallel_safe = rel->consider_parallel && subpath->parallel_safe; - pathnode->path.parallel_degree = subpath->parallel_degree; + pathnode->path.parallel_workers = subpath->parallel_workers; /* * Assume the output is unsorted, since we don't necessarily have pathkeys @@ -1681,15 +1681,15 @@ create_gather_path(PlannerInfo *root, RelOptInfo *rel, Path *subpath, required_outer); pathnode->path.parallel_aware = false; pathnode->path.parallel_safe = false; - pathnode->path.parallel_degree = subpath->parallel_degree; + pathnode->path.parallel_workers = subpath->parallel_workers; pathnode->path.pathkeys = NIL; /* Gather has unordered result */ pathnode->subpath = subpath; pathnode->single_copy = false; - if (pathnode->path.parallel_degree == 0) + if (pathnode->path.parallel_workers == 0) { - pathnode->path.parallel_degree = 1; + pathnode->path.parallel_workers = 1; pathnode->path.pathkeys = subpath->pathkeys; pathnode->single_copy = true; } @@ -1718,7 +1718,7 @@ create_subqueryscan_path(PlannerInfo *root, RelOptInfo *rel, Path *subpath, pathnode->path.parallel_aware = false; pathnode->path.parallel_safe = rel->consider_parallel && subpath->parallel_safe; - pathnode->path.parallel_degree = subpath->parallel_degree; + pathnode->path.parallel_workers = subpath->parallel_workers; pathnode->path.pathkeys = pathkeys; pathnode->subpath = subpath; @@ -1745,7 +1745,7 @@ create_functionscan_path(PlannerInfo *root, RelOptInfo *rel, required_outer); pathnode->parallel_aware = false; pathnode->parallel_safe = rel->consider_parallel; - pathnode->parallel_degree = 0; + pathnode->parallel_workers = 0; pathnode->pathkeys = pathkeys; cost_functionscan(pathnode, root, rel, pathnode->param_info); @@ -1771,7 +1771,7 @@ create_valuesscan_path(PlannerInfo *root, RelOptInfo *rel, required_outer); pathnode->parallel_aware = false; pathnode->parallel_safe = rel->consider_parallel; - pathnode->parallel_degree = 0; + pathnode->parallel_workers = 0; pathnode->pathkeys = NIL; /* result is always unordered */ cost_valuesscan(pathnode, root, rel, pathnode->param_info); @@ -1796,7 +1796,7 @@ create_ctescan_path(PlannerInfo *root, RelOptInfo *rel, Relids required_outer) required_outer); pathnode->parallel_aware = false; pathnode->parallel_safe = rel->consider_parallel; - pathnode->parallel_degree = 0; + pathnode->parallel_workers = 0; pathnode->pathkeys = NIL; /* XXX for now, result is always unordered */ cost_ctescan(pathnode, root, rel, pathnode->param_info); @@ -1822,7 +1822,7 @@ create_worktablescan_path(PlannerInfo *root, RelOptInfo *rel, required_outer); pathnode->parallel_aware = false; pathnode->parallel_safe = rel->consider_parallel; - pathnode->parallel_degree = 0; + pathnode->parallel_workers = 0; pathnode->pathkeys = NIL; /* result is always unordered */ /* Cost is the same as for a regular CTE scan */ @@ -1861,7 +1861,7 @@ create_foreignscan_path(PlannerInfo *root, RelOptInfo *rel, required_outer); pathnode->path.parallel_aware = false; pathnode->path.parallel_safe = rel->consider_parallel; - pathnode->path.parallel_degree = 0; + pathnode->path.parallel_workers = 0; pathnode->path.rows = rows; pathnode->path.startup_cost = startup_cost; pathnode->path.total_cost = total_cost; @@ -2001,8 +2001,8 @@ create_nestloop_path(PlannerInfo *root, pathnode->path.parallel_aware = false; pathnode->path.parallel_safe = joinrel->consider_parallel && outer_path->parallel_safe && inner_path->parallel_safe; - /* This is a foolish way to estimate parallel_degree, but for now... */ - pathnode->path.parallel_degree = outer_path->parallel_degree; + /* This is a foolish way to estimate parallel_workers, but for now... */ + pathnode->path.parallel_workers = outer_path->parallel_workers; pathnode->path.pathkeys = pathkeys; pathnode->jointype = jointype; pathnode->outerjoinpath = outer_path; @@ -2064,8 +2064,8 @@ create_mergejoin_path(PlannerInfo *root, pathnode->jpath.path.parallel_aware = false; pathnode->jpath.path.parallel_safe = joinrel->consider_parallel && outer_path->parallel_safe && inner_path->parallel_safe; - /* This is a foolish way to estimate parallel_degree, but for now... */ - pathnode->jpath.path.parallel_degree = outer_path->parallel_degree; + /* This is a foolish way to estimate parallel_workers, but for now... */ + pathnode->jpath.path.parallel_workers = outer_path->parallel_workers; pathnode->jpath.path.pathkeys = pathkeys; pathnode->jpath.jointype = jointype; pathnode->jpath.outerjoinpath = outer_path; @@ -2126,8 +2126,8 @@ create_hashjoin_path(PlannerInfo *root, pathnode->jpath.path.parallel_aware = false; pathnode->jpath.path.parallel_safe = joinrel->consider_parallel && outer_path->parallel_safe && inner_path->parallel_safe; - /* This is a foolish way to estimate parallel_degree, but for now... */ - pathnode->jpath.path.parallel_degree = outer_path->parallel_degree; + /* This is a foolish way to estimate parallel_workers, but for now... */ + pathnode->jpath.path.parallel_workers = outer_path->parallel_workers; /* * A hashjoin never has pathkeys, since its output ordering is @@ -2177,7 +2177,7 @@ create_projection_path(PlannerInfo *root, pathnode->path.parallel_aware = false; pathnode->path.parallel_safe = rel->consider_parallel && subpath->parallel_safe; - pathnode->path.parallel_degree = subpath->parallel_degree; + pathnode->path.parallel_workers = subpath->parallel_workers; /* Projection does not change the sort order */ pathnode->path.pathkeys = subpath->pathkeys; @@ -2303,7 +2303,7 @@ create_sort_path(PlannerInfo *root, pathnode->path.parallel_aware = false; pathnode->path.parallel_safe = rel->consider_parallel && subpath->parallel_safe; - pathnode->path.parallel_degree = subpath->parallel_degree; + pathnode->path.parallel_workers = subpath->parallel_workers; pathnode->path.pathkeys = pathkeys; pathnode->subpath = subpath; @@ -2348,7 +2348,7 @@ create_group_path(PlannerInfo *root, pathnode->path.parallel_aware = false; pathnode->path.parallel_safe = rel->consider_parallel && subpath->parallel_safe; - pathnode->path.parallel_degree = subpath->parallel_degree; + pathnode->path.parallel_workers = subpath->parallel_workers; /* Group doesn't change sort ordering */ pathnode->path.pathkeys = subpath->pathkeys; @@ -2405,7 +2405,7 @@ create_upper_unique_path(PlannerInfo *root, pathnode->path.parallel_aware = false; pathnode->path.parallel_safe = rel->consider_parallel && subpath->parallel_safe; - pathnode->path.parallel_degree = subpath->parallel_degree; + pathnode->path.parallel_workers = subpath->parallel_workers; /* Unique doesn't change the input ordering */ pathnode->path.pathkeys = subpath->pathkeys; @@ -2464,7 +2464,7 @@ create_agg_path(PlannerInfo *root, pathnode->path.parallel_aware = false; pathnode->path.parallel_safe = rel->consider_parallel && subpath->parallel_safe; - pathnode->path.parallel_degree = subpath->parallel_degree; + pathnode->path.parallel_workers = subpath->parallel_workers; if (aggstrategy == AGG_SORTED) pathnode->path.pathkeys = subpath->pathkeys; /* preserves order */ else @@ -2532,7 +2532,7 @@ create_groupingsets_path(PlannerInfo *root, pathnode->path.parallel_aware = false; pathnode->path.parallel_safe = rel->consider_parallel && subpath->parallel_safe; - pathnode->path.parallel_degree = subpath->parallel_degree; + pathnode->path.parallel_workers = subpath->parallel_workers; pathnode->subpath = subpath; /* @@ -2647,7 +2647,7 @@ create_minmaxagg_path(PlannerInfo *root, pathnode->path.parallel_aware = false; /* A MinMaxAggPath implies use of subplans, so cannot be parallel-safe */ pathnode->path.parallel_safe = false; - pathnode->path.parallel_degree = 0; + pathnode->path.parallel_workers = 0; /* Result is one unordered row */ pathnode->path.rows = 1; pathnode->path.pathkeys = NIL; @@ -2705,7 +2705,7 @@ create_windowagg_path(PlannerInfo *root, pathnode->path.parallel_aware = false; pathnode->path.parallel_safe = rel->consider_parallel && subpath->parallel_safe; - pathnode->path.parallel_degree = subpath->parallel_degree; + pathnode->path.parallel_workers = subpath->parallel_workers; /* WindowAgg preserves the input sort order */ pathnode->path.pathkeys = subpath->pathkeys; @@ -2773,7 +2773,7 @@ create_setop_path(PlannerInfo *root, pathnode->path.parallel_aware = false; pathnode->path.parallel_safe = rel->consider_parallel && subpath->parallel_safe; - pathnode->path.parallel_degree = subpath->parallel_degree; + pathnode->path.parallel_workers = subpath->parallel_workers; /* SetOp preserves the input sort order if in sort mode */ pathnode->path.pathkeys = (strategy == SETOP_SORTED) ? subpath->pathkeys : NIL; @@ -2833,7 +2833,7 @@ create_recursiveunion_path(PlannerInfo *root, pathnode->path.parallel_safe = rel->consider_parallel && leftpath->parallel_safe && rightpath->parallel_safe; /* Foolish, but we'll do it like joins for now: */ - pathnode->path.parallel_degree = leftpath->parallel_degree; + pathnode->path.parallel_workers = leftpath->parallel_workers; /* RecursiveUnion result is always unsorted */ pathnode->path.pathkeys = NIL; @@ -2871,7 +2871,7 @@ create_lockrows_path(PlannerInfo *root, RelOptInfo *rel, pathnode->path.param_info = NULL; pathnode->path.parallel_aware = false; pathnode->path.parallel_safe = false; - pathnode->path.parallel_degree = 0; + pathnode->path.parallel_workers = 0; pathnode->path.rows = subpath->rows; /* @@ -2942,7 +2942,7 @@ create_modifytable_path(PlannerInfo *root, RelOptInfo *rel, pathnode->path.param_info = NULL; pathnode->path.parallel_aware = false; pathnode->path.parallel_safe = false; - pathnode->path.parallel_degree = 0; + pathnode->path.parallel_workers = 0; pathnode->path.pathkeys = NIL; /* @@ -3029,7 +3029,7 @@ create_limit_path(PlannerInfo *root, RelOptInfo *rel, pathnode->path.parallel_aware = false; pathnode->path.parallel_safe = rel->consider_parallel && subpath->parallel_safe; - pathnode->path.parallel_degree = subpath->parallel_degree; + pathnode->path.parallel_workers = subpath->parallel_workers; pathnode->path.rows = subpath->rows; pathnode->path.startup_cost = subpath->startup_cost; pathnode->path.total_cost = subpath->total_cost; diff --git a/src/backend/optimizer/util/plancat.c b/src/backend/optimizer/util/plancat.c index 3a585ade747..04529faff41 100644 --- a/src/backend/optimizer/util/plancat.c +++ b/src/backend/optimizer/util/plancat.c @@ -128,8 +128,8 @@ get_relation_info(PlannerInfo *root, Oid relationObjectId, bool inhparent, estimate_rel_size(relation, rel->attr_widths - rel->min_attr, &rel->pages, &rel->tuples, &rel->allvisfrac); - /* Retrive the parallel_degree reloption, if set. */ - rel->rel_parallel_degree = RelationGetParallelDegree(relation, -1); + /* Retrive the parallel_workers reloption, if set. */ + rel->rel_parallel_workers = RelationGetParallelDegree(relation, -1); /* * Make list of indexes. Ignore indexes on system catalogs if told to. diff --git a/src/backend/optimizer/util/relnode.c b/src/backend/optimizer/util/relnode.c index 1e87a7302ab..e2ebf479296 100644 --- a/src/backend/optimizer/util/relnode.c +++ b/src/backend/optimizer/util/relnode.c @@ -107,7 +107,7 @@ build_simple_rel(PlannerInfo *root, int relid, RelOptKind reloptkind) rel->consider_startup = (root->tuple_fraction > 0); rel->consider_param_startup = false; /* might get changed later */ rel->consider_parallel = false; /* might get changed later */ - rel->rel_parallel_degree = -1; /* set up in GetRelationInfo */ + rel->rel_parallel_workers = -1; /* set up in GetRelationInfo */ rel->reltarget = create_empty_pathtarget(); rel->pathlist = NIL; rel->ppilist = NIL; |