Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5a65eac

Browse files
committed
Fix confusion in comments about generate_gather_paths
d2d8a22 introduced a new function generate_useful_gather_paths tobe used as a replacement for generate_gather_paths, but forgot to updatea couple of places that referenced the older function.This is possibly not 100% complete (ref. create_ordered_paths), but it'sbetter 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
1 parent8deb6b3 commit5a65eac

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed

‎src/backend/optimizer/path/allpaths.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3019,10 +3019,11 @@ standard_join_search(PlannerInfo *root, int levels_needed, List *initial_rels)
30193019
join_search_one_level(root,lev);
30203020

30213021
/*
3022-
* Run generate_partitionwise_join_paths() and generate_gather_paths()
3023-
* for each just-processed joinrel. We could not do this earlier
3024-
* because both regular and partial paths can get added to a
3025-
* particular joinrel at multiple times within join_search_one_level.
3022+
* Run generate_partitionwise_join_paths() and
3023+
* generate_useful_gather_paths() for each just-processed joinrel. We
3024+
* could not do this earlier because both regular and partial paths
3025+
* can get added to a particular joinrel at multiple times within
3026+
* join_search_one_level.
30263027
*
30273028
* After that, we're done creating paths for the joinrel, so run
30283029
* set_cheapest().

‎src/backend/optimizer/plan/planner.c

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7212,14 +7212,14 @@ create_partial_grouping_paths(PlannerInfo *root,
72127212
* Generate Gather and Gather Merge paths for a grouping relation or partial
72137213
* grouping relation.
72147214
*
7215-
*generate_gather_paths does most of the work, but we also consider a special
7216-
* case: we could try sorting the data by the group_pathkeys and then applying
7217-
* Gather Merge.
7215+
*generate_useful_gather_paths does most of the work, but we also consider a
7216+
*specialcase: we could try sorting the data by the group_pathkeys and then
7217+
*applyingGather Merge.
72187218
*
72197219
* NB: This function shouldn't be used for anything other than a grouped or
72207220
* partially grouped relation not only because of the fact that it explicitly
72217221
* references group_pathkeys but we pass "true" as the third argument to
7222-
*generate_gather_paths().
7222+
*generate_useful_gather_paths().
72237223
*/
72247224
staticvoid
72257225
gather_grouping_paths(PlannerInfo*root,RelOptInfo*rel)
@@ -7379,10 +7379,11 @@ apply_scanjoin_target_to_paths(PlannerInfo *root,
73797379
* variations. So we drop old paths and thereby force the work to be done
73807380
* below the Append, except in the case of a non-parallel-safe target.
73817381
*
7382-
* Some care is needed, because we have to allow generate_gather_paths to
7383-
* see the old partial paths in the next stanza. Hence, zap the main
7384-
* pathlist here, then allow generate_gather_paths to add path(s) to the
7385-
* main list, and finally zap the partial pathlist.
7382+
* Some care is needed, because we have to allow
7383+
* generate_useful_gather_paths to see the old partial paths in the next
7384+
* stanza. Hence, zap the main pathlist here, then allow
7385+
* generate_useful_gather_paths to add path(s) to the main list, and
7386+
* finally zap the partial pathlist.
73867387
*/
73877388
if (rel_is_partitioned)
73887389
rel->pathlist=NIL;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp