diff options
Diffstat (limited to 'src/backend/optimizer/path/allpaths.c')
-rw-r--r-- | src/backend/optimizer/path/allpaths.c | 40 |
1 files changed, 22 insertions, 18 deletions
diff --git a/src/backend/optimizer/path/allpaths.c b/src/backend/optimizer/path/allpaths.c index 6deb2cf0c9c..ff5e39c1aad 100644 --- a/src/backend/optimizer/path/allpaths.c +++ b/src/backend/optimizer/path/allpaths.c @@ -163,8 +163,8 @@ make_one_rel(PlannerInfo *root, List *joinlist) set_base_rel_consider_startup(root); /* - * Generate access paths for the base rels. set_base_rel_sizes also - * sets the consider_parallel flag for each baserel, if appropriate. + * Generate access paths for the base rels. set_base_rel_sizes also sets + * the consider_parallel flag for each baserel, if appropriate. */ set_base_rel_sizes(root); set_base_rel_pathlists(root); @@ -228,7 +228,7 @@ set_base_rel_consider_startup(PlannerInfo *root) /* * set_base_rel_sizes * Set the size estimates (rows and widths) for each base-relation entry. - * Also determine whether to consider parallel paths for base relations. + * Also determine whether to consider parallel paths for base relations. * * We do this in a separate pass over the base rels so that rowcount * estimates are available for parameterized path generation, and also so @@ -509,6 +509,7 @@ set_rel_consider_parallel(PlannerInfo *root, RelOptInfo *rel, switch (rte->rtekind) { case RTE_RELATION: + /* * Currently, parallel workers can't access the leader's temporary * tables. We could possibly relax this if the wrote all of its @@ -528,7 +529,7 @@ set_rel_consider_parallel(PlannerInfo *root, RelOptInfo *rel, */ if (rte->tablesample != NULL) { - Oid proparallel = func_parallel(rte->tablesample->tsmhandler); + Oid proparallel = func_parallel(rte->tablesample->tsmhandler); if (proparallel != PROPARALLEL_SAFE) return; @@ -557,14 +558,15 @@ set_rel_consider_parallel(PlannerInfo *root, RelOptInfo *rel, break; case RTE_SUBQUERY: + /* * Subplans currently aren't passed to workers. Even if they - * were, the subplan might be using parallelism internally, and - * we can't support nested Gather nodes at present. Finally, - * we don't have a good way of knowing whether the subplan - * involves any parallel-restricted operations. It would be - * nice to relax this restriction some day, but it's going to - * take a fair amount of work. + * were, the subplan might be using parallelism internally, and we + * can't support nested Gather nodes at present. Finally, we + * don't have a good way of knowing whether the subplan involves + * any parallel-restricted operations. It would be nice to relax + * this restriction some day, but it's going to take a fair amount + * of work. */ return; @@ -580,6 +582,7 @@ set_rel_consider_parallel(PlannerInfo *root, RelOptInfo *rel, break; case RTE_VALUES: + /* * The data for a VALUES clause is stored in the plan tree itself, * so scanning it in a worker is fine. @@ -587,6 +590,7 @@ set_rel_consider_parallel(PlannerInfo *root, RelOptInfo *rel, break; case RTE_CTE: + /* * CTE tuplestores aren't shared among parallel workers, so we * force all CTE scans to happen in the leader. Also, populating @@ -598,8 +602,8 @@ set_rel_consider_parallel(PlannerInfo *root, RelOptInfo *rel, } /* - * If there's anything in baserestrictinfo that's parallel-restricted, - * we give up on parallelizing access to this relation. We could consider + * If there's anything in baserestrictinfo that's parallel-restricted, we + * give up on parallelizing access to this relation. We could consider * instead postponing application of the restricted quals until we're * above all the parallelism in the plan tree, but it's not clear that * this would be a win in very many cases, and it might be tricky to make @@ -609,8 +613,8 @@ set_rel_consider_parallel(PlannerInfo *root, RelOptInfo *rel, return; /* - * If the relation's outputs are not parallel-safe, we must give up. - * In the common case where the relation only outputs Vars, this check is + * If the relation's outputs are not parallel-safe, we must give up. In + * the common case where the relation only outputs Vars, this check is * very cheap; otherwise, we have to do more work. */ if (rel->reltarget_has_non_vars && @@ -1251,8 +1255,8 @@ set_append_rel_pathlist(PlannerInfo *root, RelOptInfo *rel, int parallel_workers = 0; /* - * 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 + * 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. */ @@ -2160,8 +2164,8 @@ standard_join_search(PlannerInfo *root, int levels_needed, List *initial_rels) * Run generate_gather_paths() for each just-processed joinrel. We * could not do this earlier because both regular and partial paths * can get added to a particular joinrel at multiple times within - * join_search_one_level. After that, we're done creating paths - * for the joinrel, so run set_cheapest(). + * join_search_one_level. After that, we're done creating paths for + * the joinrel, so run set_cheapest(). */ foreach(lc, root->join_rel_level[lev]) { |