@@ -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 theparallel_degree reloption, we decide what to do
675+ * If the user has set theparallel_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- * Ifparallel_degree = 0 is set for this relation, bail out. The
681+ * Ifparallel_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 )
685685return ;
686686
687687/*
688- * Use the tableparallel_degree , but don't go further than
689- *max_parallel_degree .
688+ * Use the tableparallel_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}
693693else
694694{
@@ -711,17 +711,17 @@ create_plain_partial_paths(PlannerInfo *root, RelOptInfo *rel)
711711 * sophisticated, but we need something here for now.
712712 */
713713while (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 ++ ;
717717parallel_threshold *=3 ;
718718if (parallel_threshold >=PG_INT32_MAX /3 )
719719break ;
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{
12431243AppendPath * appendpath ;
12441244ListCell * lc ;
1245- int parallel_degree = 0 ;
1245+ int parallel_workers = 0 ;
12461246
12471247/*
1248- * Decidewhat parallel degree to request for this append path. For
1249- * now, we just use the maximumparallel degree of any member . It
1248+ * Decideon the numebr of workers to request for this append path. For
1249+ * now, we just use the maximumvalue 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 */
12531253foreach (lc ,partial_subpaths )
12541254{
12551255Path * 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. */
12621262appendpath = create_append_path (rel ,partial_subpaths ,NULL ,
1263- parallel_degree );
1263+ parallel_workers );
12641264add_partial_path (rel , (Path * )appendpath );
12651265}
12661266