diff options
| author | Robert Haas | 2017-03-07 15:33:29 +0000 |
|---|---|---|
| committer | Robert Haas | 2017-03-07 15:33:29 +0000 |
| commit | a71f10189dc10a2fe422158a2c9409e0f77c6b9e (patch) | |
| tree | 7ac8d794996d36feca0816ad43a164db0f2f015f /src/include/optimizer/paths.h | |
| parent | 655393a022bd653e2b48dbf20b69236981e35195 (diff) | |
Preparatory refactoring for parallel merge join support.
Extract the logic used by hash_inner_and_outer into a separate
function, get_cheapest_parallel_safe_total_inner, so that it can
also be used to plan parallel merge joins.
Also, add a require_parallel_safe argument to the existing function
get_cheapest_path_for_pathkeys, because parallel merge join needs
to find the cheapest path for a given set of pathkeys that is
parallel-safe, not just the cheapest one overall.
Patch by me, reviewed by Dilip Kumar.
Discussion: http://postgr.es/m/CA+TgmoYOv+dFK0MWW6366dFj_xTnohQfoBDrHyB7d1oZhrgPjA@mail.gmail.com
Diffstat (limited to 'src/include/optimizer/paths.h')
| -rw-r--r-- | src/include/optimizer/paths.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/include/optimizer/paths.h b/src/include/optimizer/paths.h index ebda308c416..bc0dcf4468f 100644 --- a/src/include/optimizer/paths.h +++ b/src/include/optimizer/paths.h @@ -182,11 +182,13 @@ extern PathKeysComparison compare_pathkeys(List *keys1, List *keys2); extern bool pathkeys_contained_in(List *keys1, List *keys2); extern Path *get_cheapest_path_for_pathkeys(List *paths, List *pathkeys, Relids required_outer, - CostSelector cost_criterion); + CostSelector cost_criterion, + bool require_parallel_safe); extern Path *get_cheapest_fractional_path_for_pathkeys(List *paths, List *pathkeys, Relids required_outer, double fraction); +extern Path *get_cheapest_parallel_safe_total_inner(List *paths); extern List *build_index_pathkeys(PlannerInfo *root, IndexOptInfo *index, ScanDirection scandir); extern List *build_expression_pathkey(PlannerInfo *root, Expr *expr, |
