mirror of
https://github.com/postgres/postgres.git
synced 2025-06-03 00:02:26 -04:00
Fix confusion in comments about generate_gather_paths
d2d8a229bc58 introduced a new function generate_useful_gather_paths to be used as a replacement for generate_gather_paths, but forgot to update a couple of places that referenced the older function. This is possibly not 100% complete (ref. create_ordered_paths), but it's better than not changing anything. Author: "Hou, Zhijie" <houzj.fnst@cn.fujitsu.com> Reviewed-by: Tomas Vondra <tomas.vondra@enterprisedb.com> Discussion: https://postgr.es/m/4ce1d5116fe746a699a6d29858c6a39a@G08CNEXMBPEKD05.g08.fujitsu.local
This commit is contained in:
parent
8deb6b38dc
commit
5a65eacfdc
@ -3019,10 +3019,11 @@ standard_join_search(PlannerInfo *root, int levels_needed, List *initial_rels)
|
|||||||
join_search_one_level(root, lev);
|
join_search_one_level(root, lev);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Run generate_partitionwise_join_paths() and generate_gather_paths()
|
* Run generate_partitionwise_join_paths() and
|
||||||
* for each just-processed joinrel. We could not do this earlier
|
* generate_useful_gather_paths() for each just-processed joinrel. We
|
||||||
* because both regular and partial paths can get added to a
|
* could not do this earlier because both regular and partial paths
|
||||||
* particular joinrel at multiple times within join_search_one_level.
|
* 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
|
* After that, we're done creating paths for the joinrel, so run
|
||||||
* set_cheapest().
|
* set_cheapest().
|
||||||
|
@ -7212,14 +7212,14 @@ create_partial_grouping_paths(PlannerInfo *root,
|
|||||||
* Generate Gather and Gather Merge paths for a grouping relation or partial
|
* Generate Gather and Gather Merge paths for a grouping relation or partial
|
||||||
* grouping relation.
|
* grouping relation.
|
||||||
*
|
*
|
||||||
* generate_gather_paths does most of the work, but we also consider a special
|
* generate_useful_gather_paths does most of the work, but we also consider a
|
||||||
* case: we could try sorting the data by the group_pathkeys and then applying
|
* special case: we could try sorting the data by the group_pathkeys and then
|
||||||
* Gather Merge.
|
* applying Gather Merge.
|
||||||
*
|
*
|
||||||
* NB: This function shouldn't be used for anything other than a grouped or
|
* NB: This function shouldn't be used for anything other than a grouped or
|
||||||
* partially grouped relation not only because of the fact that it explicitly
|
* partially grouped relation not only because of the fact that it explicitly
|
||||||
* references group_pathkeys but we pass "true" as the third argument to
|
* references group_pathkeys but we pass "true" as the third argument to
|
||||||
* generate_gather_paths().
|
* generate_useful_gather_paths().
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
gather_grouping_paths(PlannerInfo *root, RelOptInfo *rel)
|
gather_grouping_paths(PlannerInfo *root, RelOptInfo *rel)
|
||||||
@ -7379,10 +7379,11 @@ apply_scanjoin_target_to_paths(PlannerInfo *root,
|
|||||||
* variations. So we drop old paths and thereby force the work to be done
|
* variations. So we drop old paths and thereby force the work to be done
|
||||||
* below the Append, except in the case of a non-parallel-safe target.
|
* below the Append, except in the case of a non-parallel-safe target.
|
||||||
*
|
*
|
||||||
* Some care is needed, because we have to allow generate_gather_paths to
|
* Some care is needed, because we have to allow
|
||||||
* see the old partial paths in the next stanza. Hence, zap the main
|
* generate_useful_gather_paths to see the old partial paths in the next
|
||||||
* pathlist here, then allow generate_gather_paths to add path(s) to the
|
* stanza. Hence, zap the main pathlist here, then allow
|
||||||
* main list, and finally zap the partial pathlist.
|
* generate_useful_gather_paths to add path(s) to the main list, and
|
||||||
|
* finally zap the partial pathlist.
|
||||||
*/
|
*/
|
||||||
if (rel_is_partitioned)
|
if (rel_is_partitioned)
|
||||||
rel->pathlist = NIL;
|
rel->pathlist = NIL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user