@@ -669,26 +669,26 @@ set_plain_rel_pathlist(PlannerInfo *root, RelOptInfo *rel, RangeTblEntry *rte)
669669static void
670670create_plain_partial_paths (PlannerInfo * root , RelOptInfo * rel )
671671{
672- int parallel_degree = 1 ;
672+ int parallel_workers = 1 ;
673673
674674 /*
675- * If the user has set the parallel_degree reloption, we decide what to do
675+ * If the user has set the parallel_workers reloption, we decide what to do
676676 * based on the value of that option. Otherwise, we estimate a value.
677677 */
678- if (rel -> rel_parallel_degree != -1 )
678+ if (rel -> rel_parallel_workers != -1 )
679679 {
680680 /*
681- * If parallel_degree = 0 is set for this relation, bail out. The
681+ * If parallel_workers = 0 is set for this relation, bail out. The
682682 * user does not want a parallel path for this relation.
683683 */
684- if (rel -> rel_parallel_degree == 0 )
684+ if (rel -> rel_parallel_workers == 0 )
685685 return ;
686686
687687 /*
688- * Use the table parallel_degree , but don't go further than
689- * max_parallel_degree .
688+ * Use the table parallel_workers , but don't go further than
689+ * max_parallel_workers_per_gather .
690690 */
691- parallel_degree = Min (rel -> rel_parallel_degree , max_parallel_degree );
691+ parallel_workers = Min (rel -> rel_parallel_workers , max_parallel_workers_per_gather );
692692 }
693693 else
694694 {
@@ -711,17 +711,17 @@ create_plain_partial_paths(PlannerInfo *root, RelOptInfo *rel)
711711 * sophisticated, but we need something here for now.
712712 */
713713 while (rel -> pages > parallel_threshold * 3 &&
714- parallel_degree < max_parallel_degree )
714+ parallel_workers < max_parallel_workers_per_gather )
715715 {
716- parallel_degree ++ ;
716+ parallel_workers ++ ;
717717 parallel_threshold *= 3 ;
718718 if (parallel_threshold >= PG_INT32_MAX / 3 )
719719 break ;
720720 }
721721 }
722722
723723 /* Add an unordered partial path based on a parallel sequential scan. */
724- add_partial_path (rel , create_seqscan_path (root , rel , NULL , parallel_degree ));
724+ add_partial_path (rel , create_seqscan_path (root , rel , NULL , parallel_workers ));
725725}
726726
727727/*
@@ -1242,25 +1242,25 @@ set_append_rel_pathlist(PlannerInfo *root, RelOptInfo *rel,
12421242 {
12431243 AppendPath * appendpath ;
12441244 ListCell * lc ;
1245- int parallel_degree = 0 ;
1245+ int parallel_workers = 0 ;
12461246
12471247 /*
1248- * Decide what parallel degree to request for this append path. For
1249- * now, we just use the maximum parallel degree of any member . It
1248+ * Decide on the numebr of workers to request for this append path. For
1249+ * now, we just use the maximum value from among the members . It
12501250 * might be useful to use a higher number if the Append node were
12511251 * smart enough to spread out the workers, but it currently isn't.
12521252 */
12531253 foreach (lc , partial_subpaths )
12541254 {
12551255 Path * path = lfirst (lc );
12561256
1257- parallel_degree = Max (parallel_degree , path -> parallel_degree );
1257+ parallel_workers = Max (parallel_workers , path -> parallel_workers );
12581258 }
1259- Assert (parallel_degree > 0 );
1259+ Assert (parallel_workers > 0 );
12601260
12611261 /* Generate a partial append path. */
12621262 appendpath = create_append_path (rel , partial_subpaths , NULL ,
1263- parallel_degree );
1263+ parallel_workers );
12641264 add_partial_path (rel , (Path * ) appendpath );
12651265 }
12661266
0 commit comments