|
PostgreSQL Source Code git master
|


Go to the source code of this file.
| void add_partial_path | ( | RelOptInfo * | parent_rel, |
| Path * | new_path | ||
| ) |
Definition at line 795 of file pathnode.c.
References Assert(), CHECK_FOR_INTERRUPTS, compare_pathkeys(), RelOptInfo::consider_parallel, Path::disabled_nodes, foreach_current_index, foreach_delete_current, lfirst, list_insert_nth(), Path::parallel_safe, RelOptInfo::partial_pathlist, Path::pathkeys, PATHKEYS_BETTER1, PATHKEYS_BETTER2, PATHKEYS_DIFFERENT, pfree(), STD_FUZZ_FACTOR, Path::total_cost, and unlikely.
Referenced by add_paths_to_append_rel(), build_index_paths(), build_setop_child_paths(), create_partial_bitmap_paths(), create_partial_distinct_paths(), create_partial_grouping_paths(), create_partial_unique_paths(), create_plain_partial_paths(), generate_grouped_paths(), grouping_planner(), set_subquery_pathlist(), try_partial_hashjoin_path(), try_partial_mergejoin_path(), and try_partial_nestloop_path().
| bool add_partial_path_precheck | ( | RelOptInfo * | parent_rel, |
| int | disabled_nodes, | ||
| Cost | total_cost, | ||
| List * | pathkeys | ||
| ) |
Definition at line 921 of file pathnode.c.
References add_path_precheck(), compare_pathkeys(), lfirst, RelOptInfo::partial_pathlist, Path::pathkeys, PATHKEYS_BETTER1, PATHKEYS_BETTER2, PATHKEYS_DIFFERENT, STD_FUZZ_FACTOR, and Path::total_cost.
Referenced by try_partial_hashjoin_path(), try_partial_mergejoin_path(), and try_partial_nestloop_path().
| void add_path | ( | RelOptInfo * | parent_rel, |
| Path * | new_path | ||
| ) |
Definition at line 461 of file pathnode.c.
References BMS_EQUAL, BMS_SUBSET1, BMS_SUBSET2, bms_subset_compare(), CHECK_FOR_INTERRUPTS, compare_path_costs_fuzzily(), compare_pathkeys(), COSTS_BETTER1, COSTS_BETTER2, COSTS_DIFFERENT, COSTS_EQUAL, Path::disabled_nodes, foreach_current_index, foreach_delete_current, IsA, lfirst, list_insert_nth(), NIL, Path::parallel_safe, PATH_REQ_OUTER, Path::pathkeys, PATHKEYS_BETTER1, PATHKEYS_BETTER2, PATHKEYS_DIFFERENT, RelOptInfo::pathlist, pfree(), Path::rows, STD_FUZZ_FACTOR, and Path::total_cost.
Referenced by add_foreign_final_paths(), add_foreign_grouping_paths(), add_foreign_ordered_paths(), add_paths_to_append_rel(), add_paths_to_grouping_rel(), add_paths_with_pathkeys_for_rel(), build_setop_child_paths(), BuildParameterizedTidPaths(), consider_groupingsets_paths(), create_degenerate_grouping_paths(), create_final_distinct_paths(), create_final_unique_paths(), create_index_paths(), create_one_window_path(), create_ordered_paths(), create_partial_grouping_paths(), create_tidscan_paths(), fileGetForeignPaths(), gather_grouping_paths(), generate_gather_paths(), generate_grouped_paths(), generate_nonunion_paths(), generate_orderedappend_paths(), generate_recursion_path(), generate_union_paths(), generate_useful_gather_paths(), get_index_paths(), grouping_planner(), mark_dummy_rel(), postgresGetForeignJoinPaths(), postgresGetForeignPaths(), preprocess_minmax_aggregates(), query_planner(), set_cte_pathlist(), set_dummy_rel_pathlist(), set_function_pathlist(), set_namedtuplestore_pathlist(), set_plain_rel_pathlist(), set_result_pathlist(), set_subquery_pathlist(), set_tablefunc_pathlist(), set_tablesample_rel_pathlist(), set_values_pathlist(), set_worktable_pathlist(), try_hashjoin_path(), try_mergejoin_path(), and try_nestloop_path().
| bool add_path_precheck | ( | RelOptInfo * | parent_rel, |
| int | disabled_nodes, | ||
| Cost | startup_cost, | ||
| Cost | total_cost, | ||
| List * | pathkeys, | ||
| Relids | required_outer | ||
| ) |
Definition at line 688 of file pathnode.c.
References bms_equal(), compare_pathkeys(), RelOptInfo::consider_param_startup, RelOptInfo::consider_startup, Path::disabled_nodes, lfirst, NIL, PATH_REQ_OUTER, Path::pathkeys, PATHKEYS_BETTER2, PATHKEYS_EQUAL, RelOptInfo::pathlist, Path::startup_cost, STD_FUZZ_FACTOR, and unlikely.
Referenced by add_partial_path_precheck(), try_hashjoin_path(), try_mergejoin_path(), and try_nestloop_path().
| void adjust_limit_rows_costs | ( | double * | rows, |
| Cost * | startup_cost, | ||
| Cost * | total_cost, | ||
| int64 | offset_est, | ||
| int64 | count_est | ||
| ) |
Definition at line 3785 of file pathnode.c.
References clamp_row_est().
Referenced by create_limit_path(), and estimate_path_cost_size().
| Path * apply_projection_to_path | ( | PlannerInfo * | root, |
| RelOptInfo * | rel, | ||
| Path * | path, | ||
| PathTarget * | target | ||
| ) |
Definition at line 2633 of file pathnode.c.
References PathTarget::cost, create_projection_path(), PathTarget::exprs, if(), is_parallel_safe(), is_projection_capable_path(), IsA, Path::parallel_safe, QualCost::per_tuple, root, Path::rows, QualCost::startup, Path::startup_cost, GatherPath::subpath, GatherMergePath::subpath, and Path::total_cost.
Referenced by adjust_paths_for_srfs(), build_minmax_path(), create_ordered_paths(), and recurse_set_operations().
| RelOptInfo * build_child_join_rel | ( | PlannerInfo * | root, |
| RelOptInfo * | outer_rel, | ||
| RelOptInfo * | inner_rel, | ||
| RelOptInfo * | parent_joinrel, | ||
| List * | restrictlist, | ||
| SpecialJoinInfo * | sjinfo, | ||
| int | nappinfos, | ||
| AppendRelInfo ** | appinfos | ||
| ) |
Definition at line 1001 of file relnode.c.
References add_child_join_rel_equivalences(), add_join_rel(), adjust_appendrel_attrs(), adjust_child_relids(), RelOptInfo::agg_info, RelOptInfo::all_partrels, RelOptInfo::allvisfrac, RelOptInfo::amflags, Assert(), RelOptInfo::baserestrictcost, RelOptInfo::baserestrictinfo, bms_copy(), build_child_join_reltarget(), build_joinrel_partition_info(), RelOptInfo::cheapest_parameterized_paths, RelOptInfo::cheapest_startup_path, RelOptInfo::cheapest_total_path, RelOptInfo::consider_parallel, RelOptInfo::consider_param_startup, RelOptInfo::consider_partitionwise_join, RelOptInfo::consider_startup, create_empty_pathtarget(), RelOptInfo::direct_lateral_relids, RelOptInfo::eclass_indexes, find_join_rel(), RelOptInfo::grouped_rel, RelOptInfo::has_eclass_joins, has_useful_pathkeys(), RelOptInfo::indexlist, InvalidOid, IS_OTHER_REL, RelOptInfo::joininfo, RelOptInfo::lateral_referencers, RelOptInfo::lateral_relids, RelOptInfo::lateral_vars, RelOptInfo::live_parts, makeNode, RelOptInfo::max_attr, RelOptInfo::min_attr, NIL, RelOptInfo::notnullattnums, RelOptInfo::nparts, RelOptInfo::nulling_relids, RelOptInfo::pages, RelOptInfo::partbounds_merged, RelOptInfo::partial_pathlist, RelOptInfo::partition_qual, RelOptInfo::pathlist, QualCost::per_tuple, RelOptInfo::ppilist, RelOptInfo::relid, RelOptInfo::relids, RELOPT_OTHER_JOINREL, RelOptInfo::reloptkind, RelOptInfo::reltarget, root, RelOptInfo::rows, RTE_JOIN, RelOptInfo::rtekind, RelOptInfo::serverid, set_foreign_rel_properties(), set_joinrel_size_estimates(), QualCost::startup, RelOptInfo::subplan_params, RelOptInfo::subroot, RelOptInfo::top_parent_relids, RelOptInfo::tuples, RelOptInfo::unique_groupclause, RelOptInfo::unique_pathkeys, RelOptInfo::unique_rel, RelOptInfo::userid, and RelOptInfo::useridiscurrent.
Referenced by try_partitionwise_join().
| RelOptInfo * build_grouped_rel | ( | PlannerInfo * | root, |
| RelOptInfo * | rel | ||
| ) |
Definition at line 484 of file relnode.c.
References RelOptInfo::all_partrels, RelOptInfo::cheapest_parameterized_paths, RelOptInfo::cheapest_startup_path, RelOptInfo::cheapest_total_path, RelOptInfo::consider_partitionwise_join, RelOptInfo::live_parts, makeNode, NIL, RelOptInfo::nparts, RelOptInfo::partbounds_merged, RelOptInfo::partial_pathlist, RelOptInfo::partition_qual, RelOptInfo::pathlist, RelOptInfo::ppilist, and RelOptInfo::rows.
Referenced by build_simple_grouped_rel(), and make_grouped_join_rel().
| RelOptInfo * build_join_rel | ( | PlannerInfo * | root, |
| Relids | joinrelids, | ||
| RelOptInfo * | outer_rel, | ||
| RelOptInfo * | inner_rel, | ||
| SpecialJoinInfo * | sjinfo, | ||
| List * | pushed_down_joins, | ||
| List ** | restrictlist_ptr | ||
| ) |
Definition at line 780 of file relnode.c.
References add_join_rel(), add_placeholders_to_joinrel(), RelOptInfo::agg_info, RelOptInfo::all_partrels, RelOptInfo::allvisfrac, RelOptInfo::amflags, Assert(), RelOptInfo::baserestrict_min_security, RelOptInfo::baserestrictcost, RelOptInfo::baserestrictinfo, bms_copy(), bms_del_members(), bms_num_members(), bms_union(), build_joinrel_joinlist(), build_joinrel_partition_info(), build_joinrel_restrictlist(), build_joinrel_tlist(), RelOptInfo::cheapest_parameterized_paths, RelOptInfo::cheapest_startup_path, RelOptInfo::cheapest_total_path, RelOptInfo::consider_parallel, RelOptInfo::consider_param_startup, RelOptInfo::consider_partitionwise_join, RelOptInfo::consider_startup, create_empty_pathtarget(), RelOptInfo::direct_lateral_relids, RelOptInfo::eclass_indexes, PathTarget::exprs, find_join_rel(), RelOptInfo::grouped_rel, RelOptInfo::has_eclass_joins, has_relevant_eclass_joinclause(), RelOptInfo::indexlist, InvalidOid, IS_OTHER_REL, is_parallel_safe(), JOIN_FULL, JOIN_INNER, RelOptInfo::joininfo, SpecialJoinInfo::jointype, lappend(), RelOptInfo::lateral_referencers, RelOptInfo::lateral_relids, RelOptInfo::lateral_vars, RelOptInfo::live_parts, makeNode, RelOptInfo::max_attr, RelOptInfo::min_attr, min_join_parameterization(), NIL, RelOptInfo::non_unique_for_rels, RelOptInfo::notnullattnums, RelOptInfo::nparts, RelOptInfo::nulling_relids, RelOptInfo::pages, RelOptInfo::partbounds_merged, RelOptInfo::partial_pathlist, RelOptInfo::partition_qual, RelOptInfo::pathlist, QualCost::per_tuple, RelOptInfo::ppilist, RelOptInfo::rel_parallel_workers, RelOptInfo::relid, RelOptInfo::relids, RELOPT_JOINREL, RelOptInfo::reloptkind, RelOptInfo::reltarget, root, RelOptInfo::rows, RTE_JOIN, RelOptInfo::rtekind, RelOptInfo::serverid, set_foreign_rel_properties(), set_joinrel_size_estimates(), QualCost::startup, RelOptInfo::statlist, RelOptInfo::subplan_params, RelOptInfo::subroot, RelOptInfo::top_parent_relids, RelOptInfo::tuples, RelOptInfo::unique_for_rels, RelOptInfo::unique_groupclause, RelOptInfo::unique_pathkeys, RelOptInfo::unique_rel, RelOptInfo::userid, and RelOptInfo::useridiscurrent.
Referenced by make_join_rel().
| RelOptInfo * build_simple_grouped_rel | ( | PlannerInfo * | root, |
| RelOptInfo * | rel | ||
| ) |
Definition at line 433 of file relnode.c.
References RelOptInfo::agg_info, RelAggInfo::agg_useful, RelAggInfo::apply_agg_at, Assert(), bms_copy(), build_grouped_rel(), create_rel_agg_info(), RelOptInfo::grouped_rel, RelAggInfo::grouped_rows, IS_DUMMY_REL, NIL, RelOptInfo::relids, RelOptInfo::reltarget, root, RelOptInfo::rows, and RelAggInfo::target.
Referenced by setup_simple_grouped_rels().
| RelOptInfo * build_simple_rel | ( | PlannerInfo * | root, |
| int | relid, | ||
| RelOptInfo * | parent | ||
| ) |
Definition at line 206 of file relnode.c.
References RelOptInfo::agg_info, RelOptInfo::all_partrels, RelOptInfo::allvisfrac, RelOptInfo::amflags, apply_child_basequals(), Assert(), RelOptInfo::baserestrict_min_security, RelOptInfo::baserestrictcost, RelOptInfo::baserestrictinfo, bms_make_singleton(), RelOptInfo::cheapest_parameterized_paths, RelOptInfo::cheapest_startup_path, RelOptInfo::cheapest_total_path, RTEPermissionInfo::checkAsUser, RelOptInfo::consider_parallel, RelOptInfo::consider_param_startup, RelOptInfo::consider_partitionwise_join, RelOptInfo::consider_startup, create_empty_pathtarget(), RelOptInfo::direct_lateral_relids, RelOptInfo::eclass_indexes, elog, ERROR, get_relation_info(), getRTEPermissionInfo(), RelOptInfo::grouped_rel, RelOptInfo::has_eclass_joins, RelOptInfo::indexlist, RangeTblEntry::inh, InvalidOid, RelOptInfo::joininfo, RelOptInfo::lateral_referencers, RelOptInfo::lateral_relids, RelOptInfo::lateral_vars, list_length(), RelOptInfo::live_parts, makeNode, mark_dummy_rel(), RelOptInfo::max_attr, RelOptInfo::min_attr, NIL, RelOptInfo::non_unique_for_rels, RelOptInfo::notnullattnums, RelOptInfo::nparts, RelOptInfo::nulling_relids, RelOptInfo::pages, palloc0(), RelOptInfo::partbounds_merged, RelOptInfo::partial_pathlist, RelOptInfo::partition_qual, RelOptInfo::pathlist, QualCost::per_tuple, RelOptInfo::ppilist, RelOptInfo::rel_parallel_workers, RelOptInfo::relid, RelOptInfo::relids, RELOPT_BASEREL, RELOPT_OTHER_MEMBER_REL, RelOptInfo::reloptkind, RelOptInfo::reltarget, root, RelOptInfo::rows, RTE_CTE, RTE_FUNCTION, RTE_NAMEDTUPLESTORE, RTE_RELATION, RTE_RESULT, RTE_SUBQUERY, RTE_TABLEFUNC, RTE_VALUES, RangeTblEntry::rtekind, RelOptInfo::rtekind, RelOptInfo::serverid, QualCost::startup, RelOptInfo::statlist, RelOptInfo::subplan_params, RelOptInfo::subroot, RelOptInfo::top_parent_relids, RelOptInfo::tuples, RelOptInfo::unique_for_rels, RelOptInfo::unique_groupclause, RelOptInfo::unique_pathkeys, RelOptInfo::unique_rel, RelOptInfo::userid, and RelOptInfo::useridiscurrent.
Referenced by add_base_rels_to_query(), expand_appendrel_subquery(), expand_inherited_rtentry(), expand_partitioned_rtentry(), plan_cluster_use_sort(), plan_create_index_workers(), query_planner(), and recurse_set_operations().
| Relids calc_nestloop_required_outer | ( | Relids | outerrelids, |
| Relids | outer_paramrels, | ||
| Relids | innerrelids, | ||
| Relids | inner_paramrels | ||
| ) |
Definition at line 2214 of file pathnode.c.
References Assert(), bms_copy(), bms_del_members(), bms_overlap(), and bms_union().
Referenced by try_nestloop_path().
Definition at line 2241 of file pathnode.c.
References Assert(), bms_overlap(), bms_union(), PATH_REQ_OUTER, and PG_USED_FOR_ASSERTS_ONLY.
Referenced by try_hashjoin_path(), and try_mergejoin_path().
Definition at line 125 of file pathnode.c.
References compare_path_costs(), Path::disabled_nodes, Path::startup_cost, TOTAL_COST, Path::total_cost, and unlikely.
Referenced by get_cheapest_fractional_path(), and get_cheapest_fractional_path_for_pathkeys().
| int compare_path_costs | ( | Path * | path1, |
| Path * | path2, | ||
| CostSelector | criterion | ||
| ) |
Definition at line 70 of file pathnode.c.
References Path::disabled_nodes, STARTUP_COST, Path::startup_cost, Path::total_cost, and unlikely.
Referenced by append_startup_cost_compare(), append_total_cost_compare(), compare_fractional_path_costs(), generate_mergejoin_paths(), get_cheapest_parameterized_child_path(), get_cheapest_path_for_pathkeys(), and set_cheapest().
| AggPath * create_agg_path | ( | PlannerInfo * | root, |
| RelOptInfo * | rel, | ||
| Path * | subpath, | ||
| PathTarget * | target, | ||
| AggStrategy | aggstrategy, | ||
| AggSplit | aggsplit, | ||
| List * | groupClause, | ||
| List * | qual, | ||
| const AggClauseCosts * | aggcosts, | ||
| double | numGroups | ||
| ) |
Definition at line 2994 of file pathnode.c.
References AGG_SORTED, AggPath::aggsplit, AggPath::aggstrategy, RelOptInfo::consider_parallel, PathTarget::cost, cost_agg(), AggPath::groupClause, list_copy_head(), list_length(), makeNode, NIL, AggPath::numGroups, Path::parallel_aware, Path::parallel_safe, Path::parallel_workers, AggPath::path, Path::pathkeys, Path::pathtype, QualCost::per_tuple, AggPath::qual, root, Path::rows, QualCost::startup, Path::startup_cost, subpath(), AggPath::subpath, Path::total_cost, AggClauseCosts::transitionSpace, and AggPath::transitionSpace.
Referenced by add_paths_to_grouping_rel(), create_final_distinct_paths(), create_final_unique_paths(), create_partial_distinct_paths(), create_partial_grouping_paths(), create_partial_unique_paths(), generate_grouped_paths(), and generate_union_paths().
| AppendPath * create_append_path | ( | PlannerInfo * | root, |
| RelOptInfo * | rel, | ||
| List * | subpaths, | ||
| List * | partial_subpaths, | ||
| List * | pathkeys, | ||
| Relids | required_outer, | ||
| int | parallel_workers, | ||
| bool | parallel_aware, | ||
| double | rows | ||
| ) |
Definition at line 1300 of file pathnode.c.
References append_startup_cost_compare(), append_total_cost_compare(), Assert(), bms_equal(), RelOptInfo::consider_parallel, cost_append(), AppendPath::first_partial_path, get_appendrel_parampathinfo(), get_baserel_parampathinfo(), lfirst, AppendPath::limit_tuples, linitial, list_concat(), list_length(), list_sort(), makeNode, NIL, Path::parallel_aware, Path::parallel_safe, Path::parallel_workers, AppendPath::path, PATH_REQ_OUTER, Path::pathkeys, Path::pathtype, RelOptInfo::relids, RELOPT_BASEREL, RelOptInfo::reloptkind, RelOptInfo::reltarget, root, Path::rows, Path::startup_cost, subpath(), AppendPath::subpaths, and Path::total_cost.
Referenced by add_paths_to_append_rel(), create_degenerate_grouping_paths(), generate_nonunion_paths(), generate_orderedappend_paths(), generate_union_paths(), mark_dummy_rel(), reparameterize_path(), and set_dummy_rel_pathlist().
| BitmapAndPath * create_bitmap_and_path | ( | PlannerInfo * | root, |
| RelOptInfo * | rel, | ||
| List * | bitmapquals | ||
| ) |
Definition at line 1131 of file pathnode.c.
References BitmapAndPath::bitmapquals, bms_add_members(), RelOptInfo::consider_parallel, cost_bitmap_and_node(), get_baserel_parampathinfo(), lfirst, makeNode, NIL, Path::parallel_aware, Path::parallel_safe, Path::parallel_workers, BitmapAndPath::path, PATH_REQ_OUTER, Path::pathkeys, Path::pathtype, RelOptInfo::reltarget, and root.
Referenced by bitmap_and_cost_est(), and choose_bitmap_and().
| BitmapHeapPath * create_bitmap_heap_path | ( | PlannerInfo * | root, |
| RelOptInfo * | rel, | ||
| Path * | bitmapqual, | ||
| Relids | required_outer, | ||
| double | loop_count, | ||
| int | parallel_degree | ||
| ) |
Definition at line 1098 of file pathnode.c.
References BitmapHeapPath::bitmapqual, RelOptInfo::consider_parallel, cost_bitmap_heap_scan(), get_baserel_parampathinfo(), makeNode, NIL, Path::parallel_aware, Path::parallel_safe, Path::parallel_workers, BitmapHeapPath::path, Path::pathkeys, Path::pathtype, RelOptInfo::reltarget, and root.
Referenced by create_index_paths(), create_partial_bitmap_paths(), and reparameterize_path().
| BitmapOrPath * create_bitmap_or_path | ( | PlannerInfo * | root, |
| RelOptInfo * | rel, | ||
| List * | bitmapquals | ||
| ) |
Definition at line 1183 of file pathnode.c.
References BitmapOrPath::bitmapquals, bms_add_members(), RelOptInfo::consider_parallel, cost_bitmap_or_node(), get_baserel_parampathinfo(), lfirst, makeNode, NIL, Path::parallel_aware, Path::parallel_safe, Path::parallel_workers, BitmapOrPath::path, PATH_REQ_OUTER, Path::pathkeys, Path::pathtype, RelOptInfo::reltarget, and root.
Referenced by generate_bitmap_or_paths().
| Path * create_ctescan_path | ( | PlannerInfo * | root, |
| RelOptInfo * | rel, | ||
| List * | pathkeys, | ||
| Relids | required_outer | ||
| ) |
Definition at line 1954 of file pathnode.c.
References RelOptInfo::consider_parallel, cost_ctescan(), get_baserel_parampathinfo(), makeNode, Path::parallel_aware, Path::parallel_safe, Path::parallel_workers, Path::pathkeys, Path::pathtype, RelOptInfo::reltarget, and root.
Referenced by set_cte_pathlist().
| ForeignPath * create_foreign_join_path | ( | PlannerInfo * | root, |
| RelOptInfo * | rel, | ||
| PathTarget * | target, | ||
| double | rows, | ||
| int | disabled_nodes, | ||
| Cost | startup_cost, | ||
| Cost | total_cost, | ||
| List * | pathkeys, | ||
| Relids | required_outer, | ||
| Path * | fdw_outerpath, | ||
| List * | fdw_restrictinfo, | ||
| List * | fdw_private | ||
| ) |
Definition at line 2113 of file pathnode.c.
References bms_is_empty, RelOptInfo::consider_parallel, Path::disabled_nodes, elog, ERROR, ForeignPath::fdw_outerpath, ForeignPath::fdw_private, ForeignPath::fdw_restrictinfo, RelOptInfo::lateral_relids, makeNode, Path::parallel_aware, Path::parallel_safe, Path::parallel_workers, ForeignPath::path, Path::pathkeys, Path::pathtype, RelOptInfo::reltarget, Path::rows, Path::startup_cost, and Path::total_cost.
Referenced by add_paths_with_pathkeys_for_rel(), and postgresGetForeignJoinPaths().
| ForeignPath * create_foreign_upper_path | ( | PlannerInfo * | root, |
| RelOptInfo * | rel, | ||
| PathTarget * | target, | ||
| double | rows, | ||
| int | disabled_nodes, | ||
| Cost | startup_cost, | ||
| Cost | total_cost, | ||
| List * | pathkeys, | ||
| Path * | fdw_outerpath, | ||
| List * | fdw_restrictinfo, | ||
| List * | fdw_private | ||
| ) |
Definition at line 2167 of file pathnode.c.
References Assert(), bms_is_empty, RelOptInfo::consider_parallel, Path::disabled_nodes, ForeignPath::fdw_outerpath, ForeignPath::fdw_private, ForeignPath::fdw_restrictinfo, RelOptInfo::lateral_relids, makeNode, Path::parallel_aware, Path::parallel_safe, Path::parallel_workers, ForeignPath::path, Path::pathkeys, Path::pathtype, RelOptInfo::reltarget, Path::rows, Path::startup_cost, and Path::total_cost.
Referenced by add_foreign_final_paths(), add_foreign_grouping_paths(), and add_foreign_ordered_paths().
| ForeignPath * create_foreignscan_path | ( | PlannerInfo * | root, |
| RelOptInfo * | rel, | ||
| PathTarget * | target, | ||
| double | rows, | ||
| int | disabled_nodes, | ||
| Cost | startup_cost, | ||
| Cost | total_cost, | ||
| List * | pathkeys, | ||
| Relids | required_outer, | ||
| Path * | fdw_outerpath, | ||
| List * | fdw_restrictinfo, | ||
| List * | fdw_private | ||
| ) |
Definition at line 2065 of file pathnode.c.
References Assert(), RelOptInfo::consider_parallel, Path::disabled_nodes, ForeignPath::fdw_outerpath, ForeignPath::fdw_private, ForeignPath::fdw_restrictinfo, get_baserel_parampathinfo(), IS_SIMPLE_REL, makeNode, Path::parallel_aware, Path::parallel_safe, Path::parallel_workers, ForeignPath::path, Path::pathkeys, Path::pathtype, RelOptInfo::reltarget, root, Path::rows, Path::startup_cost, and Path::total_cost.
Referenced by add_paths_with_pathkeys_for_rel(), fileGetForeignPaths(), and postgresGetForeignPaths().
| Path * create_functionscan_path | ( | PlannerInfo * | root, |
| RelOptInfo * | rel, | ||
| List * | pathkeys, | ||
| Relids | required_outer | ||
| ) |
Definition at line 1876 of file pathnode.c.
References RelOptInfo::consider_parallel, cost_functionscan(), get_baserel_parampathinfo(), makeNode, Path::parallel_aware, Path::parallel_safe, Path::parallel_workers, Path::pathkeys, Path::pathtype, RelOptInfo::reltarget, and root.
Referenced by set_function_pathlist().
| GatherMergePath * create_gather_merge_path | ( | PlannerInfo * | root, |
| RelOptInfo * | rel, | ||
| Path * | subpath, | ||
| PathTarget * | target, | ||
| List * | pathkeys, | ||
| Relids | required_outer, | ||
| double * | rows | ||
| ) |
Definition at line 1750 of file pathnode.c.
References Assert(), cost_gather_merge(), elog, ERROR, get_baserel_parampathinfo(), makeNode, GatherMergePath::num_workers, Path::parallel_aware, GatherMergePath::path, Path::pathkeys, pathkeys_contained_in(), Path::pathtype, RelOptInfo::reltarget, root, subpath(), and GatherMergePath::subpath.
Referenced by create_ordered_paths(), gather_grouping_paths(), generate_gather_paths(), and generate_useful_gather_paths().
| GatherPath * create_gather_path | ( | PlannerInfo * | root, |
| RelOptInfo * | rel, | ||
| Path * | subpath, | ||
| PathTarget * | target, | ||
| Relids | required_outer, | ||
| double * | rows | ||
| ) |
Definition at line 1802 of file pathnode.c.
References Assert(), cost_gather(), get_baserel_parampathinfo(), makeNode, NIL, GatherPath::num_workers, Path::parallel_aware, Path::parallel_safe, Path::parallel_workers, GatherPath::path, Path::pathkeys, Path::pathtype, root, GatherPath::single_copy, subpath(), and GatherPath::subpath.
Referenced by generate_gather_paths(), and generate_union_paths().
| GroupPath * create_group_path | ( | PlannerInfo * | root, |
| RelOptInfo * | rel, | ||
| Path * | subpath, | ||
| List * | groupClause, | ||
| List * | qual, | ||
| double | numGroups | ||
| ) |
Definition at line 2885 of file pathnode.c.
References RelOptInfo::consider_parallel, PathTarget::cost, cost_group(), GroupPath::groupClause, list_length(), makeNode, Path::parallel_aware, Path::parallel_safe, Path::parallel_workers, GroupPath::path, Path::pathkeys, Path::pathtype, QualCost::per_tuple, GroupPath::qual, RelOptInfo::reltarget, root, Path::rows, QualCost::startup, Path::startup_cost, subpath(), GroupPath::subpath, and Path::total_cost.
Referenced by add_paths_to_grouping_rel(), and create_partial_grouping_paths().
| GroupResultPath * create_group_result_path | ( | PlannerInfo * | root, |
| RelOptInfo * | rel, | ||
| PathTarget * | target, | ||
| List * | havingqual | ||
| ) |
Definition at line 1609 of file pathnode.c.
References RelOptInfo::consider_parallel, PathTarget::cost, cost_qual_eval(), cpu_tuple_cost, makeNode, NIL, Path::parallel_aware, Path::parallel_safe, Path::parallel_workers, GroupResultPath::path, Path::pathkeys, Path::pathtype, QualCost::per_tuple, GroupResultPath::quals, root, Path::rows, QualCost::startup, Path::startup_cost, and Path::total_cost.
Referenced by create_degenerate_grouping_paths(), and query_planner().
| GroupingSetsPath * create_groupingsets_path | ( | PlannerInfo * | root, |
| RelOptInfo * | rel, | ||
| Path * | subpath, | ||
| List * | having_qual, | ||
| AggStrategy | aggstrategy, | ||
| List * | rollups, | ||
| const AggClauseCosts * | agg_costs | ||
| ) |
Definition at line 3076 of file pathnode.c.
References AGG_HASHED, AGG_MIXED, AGG_PLAIN, AGG_SORTED, GroupingSetsPath::aggstrategy, Assert(), RelOptInfo::consider_parallel, PathTarget::cost, cost_agg(), cost_sort(), Path::disabled_nodes, RollupData::gsets, RollupData::is_hashed, lfirst, linitial, list_length(), makeNode, NIL, RollupData::numGroups, Path::parallel_aware, Path::parallel_safe, Path::parallel_workers, GroupingSetsPath::path, Path::pathkeys, Path::pathtype, QualCost::per_tuple, GroupingSetsPath::qual, RelOptInfo::reltarget, GroupingSetsPath::rollups, root, Path::rows, QualCost::startup, Path::startup_cost, subpath(), GroupingSetsPath::subpath, Path::total_cost, AggClauseCosts::transitionSpace, GroupingSetsPath::transitionSpace, and work_mem.
Referenced by consider_groupingsets_paths().
| HashPath * create_hashjoin_path | ( | PlannerInfo * | root, |
| RelOptInfo * | joinrel, | ||
| JoinType | jointype, | ||
| JoinCostWorkspace * | workspace, | ||
| JoinPathExtraData * | extra, | ||
| Path * | outer_path, | ||
| Path * | inner_path, | ||
| bool | parallel_hash, | ||
| List * | restrict_clauses, | ||
| Relids | required_outer, | ||
| List * | hashclauses | ||
| ) |
Definition at line 2458 of file pathnode.c.
References RelOptInfo::consider_parallel, final_cost_hashjoin(), get_joinrel_parampathinfo(), JoinPath::inner_unique, JoinPathExtraData::inner_unique, JoinPath::innerjoinpath, JoinPath::joinrestrictinfo, JoinPath::jointype, HashPath::jpath, makeNode, NIL, JoinPath::outerjoinpath, Path::parallel_safe, Path::parallel_workers, HashPath::path_hashclauses, RelOptInfo::reltarget, root, and JoinPathExtraData::sjinfo.
Referenced by try_hashjoin_path(), and try_partial_hashjoin_path().
| IncrementalSortPath * create_incremental_sort_path | ( | PlannerInfo * | root, |
| RelOptInfo * | rel, | ||
| Path * | subpath, | ||
| List * | pathkeys, | ||
| int | presorted_keys, | ||
| double | limit_tuples | ||
| ) |
Definition at line 2792 of file pathnode.c.
References RelOptInfo::consider_parallel, cost_incremental_sort(), makeNode, Path::parallel_aware, Path::parallel_safe, Path::parallel_workers, SortPath::path, Path::pathkeys, Path::pathtype, root, sort(), subpath(), SortPath::subpath, and work_mem.
Referenced by build_setop_child_paths(), create_final_unique_paths(), create_one_window_path(), create_ordered_paths(), create_partial_unique_paths(), gather_grouping_paths(), generate_grouped_paths(), generate_useful_gather_paths(), and make_ordered_path().
| IndexPath * create_index_path | ( | PlannerInfo * | root, |
| IndexOptInfo * | index, | ||
| List * | indexclauses, | ||
| List * | indexorderbys, | ||
| List * | indexorderbycols, | ||
| List * | pathkeys, | ||
| ScanDirection | indexscandir, | ||
| bool | indexonly, | ||
| Relids | required_outer, | ||
| double | loop_count, | ||
| bool | partial_path | ||
| ) |
Definition at line 1049 of file pathnode.c.
References RelOptInfo::consider_parallel, cost_index(), get_baserel_parampathinfo(), IndexPath::indexclauses, IndexPath::indexinfo, IndexPath::indexorderbycols, IndexPath::indexorderbys, IndexPath::indexscandir, makeNode, Path::parallel_aware, Path::parallel_safe, Path::parallel_workers, IndexPath::path, Path::pathkeys, Path::pathtype, RelOptInfo::reltarget, and root.
Referenced by build_index_paths(), and plan_cluster_use_sort().
| LimitPath * create_limit_path | ( | PlannerInfo * | root, |
| RelOptInfo * | rel, | ||
| Path * | subpath, | ||
| Node * | limitOffset, | ||
| Node * | limitCount, | ||
| LimitOption | limitOption, | ||
| int64 | offset_est, | ||
| int64 | count_est | ||
| ) |
Definition at line 3729 of file pathnode.c.
References adjust_limit_rows_costs(), RelOptInfo::consider_parallel, Path::disabled_nodes, LimitPath::limitCount, LimitPath::limitOffset, LimitPath::limitOption, makeNode, Path::parallel_aware, Path::parallel_safe, Path::parallel_workers, LimitPath::path, Path::pathkeys, Path::pathtype, Path::rows, Path::startup_cost, subpath(), LimitPath::subpath, and Path::total_cost.
Referenced by create_final_distinct_paths(), create_partial_distinct_paths(), and grouping_planner().
| LockRowsPath * create_lockrows_path | ( | PlannerInfo * | root, |
| RelOptInfo * | rel, | ||
| Path * | subpath, | ||
| List * | rowMarks, | ||
| int | epqParam | ||
| ) |
Definition at line 3567 of file pathnode.c.
References cpu_tuple_cost, Path::disabled_nodes, LockRowsPath::epqParam, makeNode, NIL, Path::parallel_aware, Path::parallel_safe, Path::parallel_workers, LockRowsPath::path, Path::pathkeys, Path::pathtype, LockRowsPath::rowMarks, Path::rows, Path::startup_cost, subpath(), LockRowsPath::subpath, and Path::total_cost.
Referenced by grouping_planner().
| MaterialPath * create_material_path | ( | RelOptInfo * | rel, |
| Path * | subpath | ||
| ) |
Definition at line 1657 of file pathnode.c.
References Assert(), RelOptInfo::consider_parallel, cost_material(), makeNode, Path::parallel_aware, Path::parallel_safe, Path::parallel_workers, MaterialPath::path, Path::pathkeys, Path::pathtype, RelOptInfo::reltarget, subpath(), and MaterialPath::subpath.
Referenced by consider_parallel_nestloop(), match_unsorted_outer(), reparameterize_path(), and set_tablesample_rel_pathlist().
| MemoizePath * create_memoize_path | ( | PlannerInfo * | root, |
| RelOptInfo * | rel, | ||
| Path * | subpath, | ||
| List * | param_exprs, | ||
| List * | hash_operators, | ||
| bool | singlerow, | ||
| bool | binary_mode, | ||
| Cardinality | est_calls | ||
| ) |
Definition at line 1690 of file pathnode.c.
References Assert(), MemoizePath::binary_mode, clamp_row_est(), RelOptInfo::consider_parallel, cpu_tuple_cost, Path::disabled_nodes, enable_memoize, MemoizePath::est_calls, MemoizePath::est_entries, MemoizePath::est_hit_ratio, MemoizePath::est_unique_keys, MemoizePath::hash_operators, makeNode, Path::parallel_aware, Path::parallel_safe, Path::parallel_workers, MemoizePath::param_exprs, MemoizePath::path, Path::pathkeys, Path::pathtype, RelOptInfo::reltarget, Path::rows, MemoizePath::singlerow, Path::startup_cost, subpath(), MemoizePath::subpath, and Path::total_cost.
Referenced by get_memoize_path(), and reparameterize_path().
| MergeAppendPath * create_merge_append_path | ( | PlannerInfo * | root, |
| RelOptInfo * | rel, | ||
| List * | subpaths, | ||
| List * | pathkeys, | ||
| Relids | required_outer | ||
| ) |
Definition at line 1471 of file pathnode.c.
References Assert(), bms_equal(), bms_is_empty, RelOptInfo::consider_parallel, cost_incremental_sort(), cost_merge_append(), cost_sort(), Path::disabled_nodes, enable_incremental_sort, RelOptInfo::lateral_relids, lfirst, MergeAppendPath::limit_tuples, linitial, list_length(), makeNode, Path::parallel_aware, Path::parallel_safe, Path::parallel_workers, MergeAppendPath::path, PATH_REQ_OUTER, Path::pathkeys, pathkeys_count_contained_in(), Path::pathtype, RelOptInfo::relids, RelOptInfo::reltarget, root, Path::rows, Path::startup_cost, subpath(), MergeAppendPath::subpaths, Path::total_cost, and work_mem.
Referenced by generate_orderedappend_paths(), and generate_union_paths().
| MergePath * create_mergejoin_path | ( | PlannerInfo * | root, |
| RelOptInfo * | joinrel, | ||
| JoinType | jointype, | ||
| JoinCostWorkspace * | workspace, | ||
| JoinPathExtraData * | extra, | ||
| Path * | outer_path, | ||
| Path * | inner_path, | ||
| List * | restrict_clauses, | ||
| List * | pathkeys, | ||
| Relids | required_outer, | ||
| List * | mergeclauses, | ||
| List * | outersortkeys, | ||
| List * | innersortkeys, | ||
| int | outer_presorted_keys | ||
| ) |
Definition at line 2390 of file pathnode.c.
References RelOptInfo::consider_parallel, final_cost_mergejoin(), get_joinrel_parampathinfo(), JoinPath::inner_unique, JoinPathExtraData::inner_unique, JoinPath::innerjoinpath, MergePath::innersortkeys, JoinPath::joinrestrictinfo, JoinPath::jointype, MergePath::jpath, makeNode, MergePath::outer_presorted_keys, JoinPath::outerjoinpath, MergePath::outersortkeys, Path::parallel_safe, Path::parallel_workers, MergePath::path_mergeclauses, RelOptInfo::reltarget, root, and JoinPathExtraData::sjinfo.
Referenced by try_mergejoin_path(), and try_partial_mergejoin_path().
| MinMaxAggPath * create_minmaxagg_path | ( | PlannerInfo * | root, |
| RelOptInfo * | rel, | ||
| PathTarget * | target, | ||
| List * | mmaggregates, | ||
| List * | quals | ||
| ) |
Definition at line 3239 of file pathnode.c.
References PathTarget::cost, cost_qual_eval(), cpu_tuple_cost, Path::disabled_nodes, PathTarget::exprs, is_parallel_safe(), lfirst, makeNode, MinMaxAggPath::mmaggregates, NIL, Path::parallel_aware, Path::parallel_safe, Path::parallel_workers, MinMaxAggPath::path, MinMaxAggInfo::path, MinMaxAggInfo::pathcost, Path::pathkeys, Path::pathtype, QualCost::per_tuple, MinMaxAggPath::quals, root, Path::rows, QualCost::startup, Path::startup_cost, and Path::total_cost.
Referenced by preprocess_minmax_aggregates().
| ModifyTablePath * create_modifytable_path | ( | PlannerInfo * | root, |
| RelOptInfo * | rel, | ||
| Path * | subpath, | ||
| CmdType | operation, | ||
| bool | canSetTag, | ||
| Index | nominalRelation, | ||
| Index | rootRelation, | ||
| List * | resultRelations, | ||
| List * | updateColnosLists, | ||
| List * | withCheckOptionLists, | ||
| List * | returningLists, | ||
| List * | rowMarks, | ||
| OnConflictExpr * | onconflict, | ||
| List * | mergeActionLists, | ||
| List * | mergeJoinConditions, | ||
| int | epqParam | ||
| ) |
Definition at line 3629 of file pathnode.c.
References Assert(), ModifyTablePath::canSetTag, CMD_MERGE, CMD_UPDATE, Path::disabled_nodes, ModifyTablePath::epqParam, list_length(), makeNode, ModifyTablePath::mergeActionLists, ModifyTablePath::mergeJoinConditions, NIL, ModifyTablePath::nominalRelation, ModifyTablePath::onconflict, ModifyTablePath::operation, Path::parallel_aware, Path::parallel_safe, Path::parallel_workers, ModifyTablePath::path, Path::pathkeys, Path::pathtype, RelOptInfo::reltarget, ModifyTablePath::resultRelations, ModifyTablePath::returningLists, ModifyTablePath::rootRelation, ModifyTablePath::rowMarks, Path::rows, Path::startup_cost, subpath(), ModifyTablePath::subpath, Path::total_cost, ModifyTablePath::updateColnosLists, and ModifyTablePath::withCheckOptionLists.
Referenced by grouping_planner().
| Path * create_namedtuplestorescan_path | ( | PlannerInfo * | root, |
| RelOptInfo * | rel, | ||
| Relids | required_outer | ||
| ) |
Definition at line 1980 of file pathnode.c.
References RelOptInfo::consider_parallel, cost_namedtuplestorescan(), get_baserel_parampathinfo(), makeNode, NIL, Path::parallel_aware, Path::parallel_safe, Path::parallel_workers, Path::pathkeys, Path::pathtype, RelOptInfo::reltarget, and root.
Referenced by set_namedtuplestore_pathlist().
| NestPath * create_nestloop_path | ( | PlannerInfo * | root, |
| RelOptInfo * | joinrel, | ||
| JoinType | jointype, | ||
| JoinCostWorkspace * | workspace, | ||
| JoinPathExtraData * | extra, | ||
| Path * | outer_path, | ||
| Path * | inner_path, | ||
| List * | restrict_clauses, | ||
| List * | pathkeys, | ||
| Relids | required_outer | ||
| ) |
Definition at line 2293 of file pathnode.c.
References bms_is_member(), bms_overlap(), RelOptInfo::consider_parallel, final_cost_nestloop(), get_joinrel_parampathinfo(), get_param_path_clause_serials(), JoinPath::inner_unique, JoinPathExtraData::inner_unique, JoinPath::innerjoinpath, JoinPath::joinrestrictinfo, JoinPath::jointype, NestPath::jpath, lappend(), lfirst, makeNode, NIL, JoinPath::outerjoinpath, Path::parallel_safe, Path::parallel_workers, PATH_REQ_OUTER, RelOptInfo::reltarget, RestrictInfo::rinfo_serial, root, and JoinPathExtraData::sjinfo.
Referenced by try_nestloop_path(), and try_partial_nestloop_path().
| ProjectionPath * create_projection_path | ( | PlannerInfo * | root, |
| RelOptInfo * | rel, | ||
| Path * | subpath, | ||
| PathTarget * | target | ||
| ) |
Definition at line 2524 of file pathnode.c.
References Assert(), RelOptInfo::consider_parallel, PathTarget::cost, cpu_tuple_cost, Path::disabled_nodes, ProjectionPath::dummypp, equal(), PathTarget::exprs, is_parallel_safe(), is_projection_capable_path(), IsA, makeNode, Path::parallel_aware, Path::parallel_safe, Path::parallel_workers, ProjectionPath::path, Path::pathkeys, Path::pathtype, QualCost::per_tuple, root, Path::rows, QualCost::startup, Path::startup_cost, subpath(), ProjectionPath::subpath, and Path::total_cost.
Referenced by add_paths_with_pathkeys_for_rel(), adjust_paths_for_srfs(), apply_projection_to_path(), apply_scanjoin_target_to_paths(), create_final_unique_paths(), create_partial_grouping_paths(), create_partial_unique_paths(), generate_grouped_paths(), and recurse_set_operations().
| RecursiveUnionPath * create_recursiveunion_path | ( | PlannerInfo * | root, |
| RelOptInfo * | rel, | ||
| Path * | leftpath, | ||
| Path * | rightpath, | ||
| PathTarget * | target, | ||
| List * | distinctList, | ||
| int | wtParam, | ||
| double | numGroups | ||
| ) |
Definition at line 3522 of file pathnode.c.
References RelOptInfo::consider_parallel, cost_recursive_union(), RecursiveUnionPath::distinctList, RecursiveUnionPath::leftpath, makeNode, NIL, RecursiveUnionPath::numGroups, Path::parallel_aware, Path::parallel_safe, Path::parallel_workers, RecursiveUnionPath::path, Path::pathkeys, Path::pathtype, RecursiveUnionPath::rightpath, and RecursiveUnionPath::wtParam.
Referenced by generate_recursion_path().
| RelAggInfo * create_rel_agg_info | ( | PlannerInfo * | root, |
| RelOptInfo * | rel, | ||
| bool | calculate_grouped_rows | ||
| ) |
Definition at line 2655 of file relnode.c.
References add_column_to_pathtarget(), adjust_appendrel_attrs_multilevel(), RelOptInfo::agg_info, RelAggInfo::agg_input, RelAggInfo::agg_useful, AggClauseInfo::aggref, AGGSPLIT_INITIAL_SERIAL, RelAggInfo::apply_agg_at, Assert(), copyObject, create_empty_pathtarget(), eager_aggregation_possible_for_relation(), estimate_num_groups(), RelAggInfo::group_clauses, RelAggInfo::group_exprs, RelOptInfo::grouped_rel, RelAggInfo::grouped_rows, init_grouping_targets(), IS_GROUPED_REL, IS_OTHER_REL, IsA, lfirst_node, makeNode, mark_partial_aggref(), min_eager_agg_group_size, NIL, root, RelOptInfo::rows, set_pathtarget_cost_width(), and RelAggInfo::target.
Referenced by build_simple_grouped_rel(), and make_grouped_join_rel().
| Path * create_resultscan_path | ( | PlannerInfo * | root, |
| RelOptInfo * | rel, | ||
| Relids | required_outer | ||
| ) |
Definition at line 2006 of file pathnode.c.
References RelOptInfo::consider_parallel, cost_resultscan(), get_baserel_parampathinfo(), makeNode, NIL, Path::parallel_aware, Path::parallel_safe, Path::parallel_workers, Path::pathkeys, Path::pathtype, RelOptInfo::reltarget, and root.
Referenced by reparameterize_path(), and set_result_pathlist().
| Path * create_samplescan_path | ( | PlannerInfo * | root, |
| RelOptInfo * | rel, | ||
| Relids | required_outer | ||
| ) |
Definition at line 1008 of file pathnode.c.
References RelOptInfo::consider_parallel, cost_samplescan(), get_baserel_parampathinfo(), makeNode, NIL, Path::parallel_aware, Path::parallel_safe, Path::parallel_workers, Path::pathkeys, Path::pathtype, RelOptInfo::reltarget, and root.
Referenced by reparameterize_path(), and set_tablesample_rel_pathlist().
| Path * create_seqscan_path | ( | PlannerInfo * | root, |
| RelOptInfo * | rel, | ||
| Relids | required_outer, | ||
| int | parallel_workers | ||
| ) |
Definition at line 983 of file pathnode.c.
References RelOptInfo::consider_parallel, cost_seqscan(), get_baserel_parampathinfo(), makeNode, NIL, Path::parallel_aware, Path::parallel_safe, Path::parallel_workers, Path::pathkeys, Path::pathtype, RelOptInfo::reltarget, and root.
Referenced by create_plain_partial_paths(), plan_cluster_use_sort(), reparameterize_path(), and set_plain_rel_pathlist().
| ProjectSetPath * create_set_projection_path | ( | PlannerInfo * | root, |
| RelOptInfo * | rel, | ||
| Path * | subpath, | ||
| PathTarget * | target | ||
| ) |
Definition at line 2722 of file pathnode.c.
References RelOptInfo::consider_parallel, PathTarget::cost, cpu_tuple_cost, Path::disabled_nodes, expression_returns_set_rows(), PathTarget::exprs, is_parallel_safe(), lfirst, makeNode, Path::parallel_aware, Path::parallel_safe, Path::parallel_workers, ProjectSetPath::path, Path::pathkeys, Path::pathtype, QualCost::per_tuple, root, Path::rows, QualCost::startup, Path::startup_cost, subpath(), ProjectSetPath::subpath, and Path::total_cost.
Referenced by adjust_paths_for_srfs().
| SetOpPath * create_setop_path | ( | PlannerInfo * | root, |
| RelOptInfo * | rel, | ||
| Path * | leftpath, | ||
| Path * | rightpath, | ||
| SetOpCmd | cmd, | ||
| SetOpStrategy | strategy, | ||
| List * | groupList, | ||
| double | numGroups, | ||
| double | outputRows | ||
| ) |
Definition at line 3403 of file pathnode.c.
References SetOpPath::cmd, RelOptInfo::consider_parallel, cpu_operator_cost, Path::disabled_nodes, enable_hashagg, EstimateSetOpHashTableSpace(), get_hash_memory_limit(), SetOpPath::groupList, if(), SetOpPath::leftpath, list_length(), makeNode, NIL, SetOpPath::numGroups, Path::parallel_aware, Path::parallel_safe, Path::parallel_workers, SetOpPath::path, Path::pathkeys, Path::pathtype, RelOptInfo::reltarget, SetOpPath::rightpath, Path::rows, SETOP_SORTED, Path::startup_cost, SetOpPath::strategy, and Path::total_cost.
Referenced by generate_nonunion_paths().
| SortPath * create_sort_path | ( | PlannerInfo * | root, |
| RelOptInfo * | rel, | ||
| Path * | subpath, | ||
| List * | pathkeys, | ||
| double | limit_tuples | ||
| ) |
Definition at line 2841 of file pathnode.c.
References RelOptInfo::consider_parallel, cost_sort(), makeNode, Path::parallel_aware, Path::parallel_safe, Path::parallel_workers, SortPath::path, Path::pathkeys, Path::pathtype, root, subpath(), SortPath::subpath, and work_mem.
Referenced by add_paths_with_pathkeys_for_rel(), build_setop_child_paths(), create_final_unique_paths(), create_one_window_path(), create_ordered_paths(), create_partial_unique_paths(), gather_grouping_paths(), generate_grouped_paths(), generate_nonunion_paths(), generate_union_paths(), generate_useful_gather_paths(), and make_ordered_path().
| SubqueryScanPath * create_subqueryscan_path | ( | PlannerInfo * | root, |
| RelOptInfo * | rel, | ||
| Path * | subpath, | ||
| bool | trivial_pathtarget, | ||
| List * | pathkeys, | ||
| Relids | required_outer | ||
| ) |
Definition at line 1846 of file pathnode.c.
References RelOptInfo::consider_parallel, cost_subqueryscan(), get_baserel_parampathinfo(), makeNode, Path::parallel_aware, Path::parallel_safe, Path::parallel_workers, SubqueryScanPath::path, Path::pathkeys, Path::pathtype, RelOptInfo::reltarget, root, subpath(), and SubqueryScanPath::subpath.
Referenced by build_setop_child_paths(), reparameterize_path(), and set_subquery_pathlist().
| Path * create_tablefuncscan_path | ( | PlannerInfo * | root, |
| RelOptInfo * | rel, | ||
| Relids | required_outer | ||
| ) |
Definition at line 1902 of file pathnode.c.
References RelOptInfo::consider_parallel, cost_tablefuncscan(), get_baserel_parampathinfo(), makeNode, NIL, Path::parallel_aware, Path::parallel_safe, Path::parallel_workers, Path::pathkeys, Path::pathtype, RelOptInfo::reltarget, and root.
Referenced by set_tablefunc_pathlist().
| TidRangePath * create_tidrangescan_path | ( | PlannerInfo * | root, |
| RelOptInfo * | rel, | ||
| List * | tidrangequals, | ||
| Relids | required_outer | ||
| ) |
Definition at line 1264 of file pathnode.c.
References RelOptInfo::consider_parallel, cost_tidrangescan(), get_baserel_parampathinfo(), makeNode, NIL, Path::parallel_aware, Path::parallel_safe, Path::parallel_workers, TidRangePath::path, Path::pathkeys, Path::pathtype, RelOptInfo::reltarget, root, and TidRangePath::tidrangequals.
Referenced by create_tidscan_paths().
| TidPath * create_tidscan_path | ( | PlannerInfo * | root, |
| RelOptInfo * | rel, | ||
| List * | tidquals, | ||
| Relids | required_outer | ||
| ) |
Definition at line 1235 of file pathnode.c.
References RelOptInfo::consider_parallel, cost_tidscan(), get_baserel_parampathinfo(), makeNode, NIL, Path::parallel_aware, Path::parallel_safe, Path::parallel_workers, TidPath::path, Path::pathkeys, Path::pathtype, RelOptInfo::reltarget, root, and TidPath::tidquals.
Referenced by BuildParameterizedTidPaths(), and create_tidscan_paths().
| UniquePath * create_unique_path | ( | PlannerInfo * | root, |
| RelOptInfo * | rel, | ||
| Path * | subpath, | ||
| int | numCols, | ||
| double | numGroups | ||
| ) |
Definition at line 2942 of file pathnode.c.
References RelOptInfo::consider_parallel, cpu_operator_cost, Path::disabled_nodes, makeNode, UniquePath::numkeys, Path::parallel_aware, Path::parallel_safe, Path::parallel_workers, UniquePath::path, Path::pathkeys, Path::pathtype, Path::rows, Path::startup_cost, subpath(), UniquePath::subpath, and Path::total_cost.
Referenced by create_final_distinct_paths(), create_final_unique_paths(), create_partial_distinct_paths(), create_partial_unique_paths(), and generate_union_paths().
| Path * create_valuesscan_path | ( | PlannerInfo * | root, |
| RelOptInfo * | rel, | ||
| Relids | required_outer | ||
| ) |
Definition at line 1928 of file pathnode.c.
References RelOptInfo::consider_parallel, cost_valuesscan(), get_baserel_parampathinfo(), makeNode, NIL, Path::parallel_aware, Path::parallel_safe, Path::parallel_workers, Path::pathkeys, Path::pathtype, RelOptInfo::reltarget, and root.
Referenced by set_values_pathlist().
| WindowAggPath * create_windowagg_path | ( | PlannerInfo * | root, |
| RelOptInfo * | rel, | ||
| Path * | subpath, | ||
| PathTarget * | target, | ||
| List * | windowFuncs, | ||
| List * | runCondition, | ||
| WindowClause * | winclause, | ||
| List * | qual, | ||
| bool | topwindow | ||
| ) |
Definition at line 3330 of file pathnode.c.
References Assert(), RelOptInfo::consider_parallel, PathTarget::cost, cost_windowagg(), makeNode, NIL, Path::parallel_aware, Path::parallel_safe, Path::parallel_workers, WindowAggPath::path, Path::pathkeys, Path::pathtype, QualCost::per_tuple, WindowAggPath::qual, root, Path::rows, WindowAggPath::runCondition, QualCost::startup, Path::startup_cost, subpath(), WindowAggPath::subpath, WindowAggPath::topwindow, Path::total_cost, and WindowAggPath::winclause.
Referenced by create_one_window_path().
| Path * create_worktablescan_path | ( | PlannerInfo * | root, |
| RelOptInfo * | rel, | ||
| Relids | required_outer | ||
| ) |
Definition at line 2032 of file pathnode.c.
References RelOptInfo::consider_parallel, cost_ctescan(), get_baserel_parampathinfo(), makeNode, NIL, Path::parallel_aware, Path::parallel_safe, Path::parallel_workers, Path::pathkeys, Path::pathtype, RelOptInfo::reltarget, and root.
Referenced by set_worktable_pathlist().
| void expand_planner_arrays | ( | PlannerInfo * | root, |
| int | add_size | ||
| ) |
Definition at line 177 of file relnode.c.
References add_size(), Assert(), palloc0_array, repalloc0_array, and root.
Referenced by expand_inherited_rtentry(), and expand_partitioned_rtentry().
| RelOptInfo * fetch_upper_rel | ( | PlannerInfo * | root, |
| UpperRelationKind | kind, | ||
| Relids | relids | ||
| ) |
Definition at line 1581 of file relnode.c.
References bms_copy(), bms_equal(), RelOptInfo::cheapest_parameterized_paths, RelOptInfo::cheapest_startup_path, RelOptInfo::cheapest_total_path, RelOptInfo::consider_parallel, RelOptInfo::consider_param_startup, RelOptInfo::consider_startup, create_empty_pathtarget(), lappend(), lfirst, makeNode, NIL, RelOptInfo::pathlist, RelOptInfo::relids, RELOPT_UPPER_REL, RelOptInfo::reloptkind, RelOptInfo::reltarget, and root.
Referenced by add_rtes_to_flat_rtable(), build_setop_child_paths(), create_distinct_paths(), create_ordered_paths(), create_partial_distinct_paths(), create_partial_grouping_paths(), create_window_paths(), generate_nonunion_paths(), generate_recursion_path(), generate_union_paths(), grouping_planner(), make_grouping_rel(), make_subplan(), preprocess_minmax_aggregates(), set_subquery_pathlist(), set_subquery_size_estimates(), SS_process_ctes(), standard_planner(), and subquery_planner().
| RelOptInfo * find_base_rel | ( | PlannerInfo * | root, |
| int | relid | ||
| ) |
Definition at line 529 of file relnode.c.
References elog, ERROR, and root.
Referenced by add_base_clause_to_rel(), add_placeholders_to_base_rels(), add_vars_to_attr_needed(), add_vars_to_targetlist(), build_joinrel_tlist(), clause_selectivity_ext(), create_lateral_join_info(), distribute_row_identity_vars(), examine_simple_variable(), examine_variable(), finalize_plan(), find_childrel_parents(), find_join_input_rel(), find_single_rel_for_clauses(), get_foreign_key_join_selectivity(), get_matching_part_pairs(), get_rel_all_updated_cols(), get_translated_update_targetlist(), grouping_planner(), is_var_needed_by_join(), join_is_removable(), make_partition_pruneinfo(), make_partitionedrel_pruneinfo(), make_rel_from_joinlist(), postgresPlanForeignModify(), reduce_unique_semijoins(), remove_leftjoinrel_from_query(), set_append_rel_size(), set_base_rel_consider_startup(), set_subquery_size_estimates(), set_subqueryscan_references(), and var_is_nonnullable().
| RelOptInfo * find_base_rel_ignore_join | ( | PlannerInfo * | root, |
| int | relid | ||
| ) |
Definition at line 569 of file relnode.c.
References elog, ERROR, JOIN_INNER, RangeTblEntry::jointype, root, RTE_JOIN, and RangeTblEntry::rtekind.
Referenced by add_join_clause_to_rels(), create_lateral_join_info(), eager_aggregation_possible_for_relation(), find_appinfos_by_relids(), and remove_join_clause_from_rels().
| RelOptInfo * find_base_rel_noerr | ( | PlannerInfo * | root, |
| int | relid | ||
| ) |
Definition at line 551 of file relnode.c.
References root.
Referenced by all_rows_selectable().
| Relids find_childrel_parents | ( | PlannerInfo * | root, |
| RelOptInfo * | rel | ||
| ) |
Definition at line 1631 of file relnode.c.
References Assert(), bms_add_member(), find_base_rel(), AppendRelInfo::parent_relid, RelOptInfo::relid, RELOPT_BASEREL, RELOPT_OTHER_MEMBER_REL, RelOptInfo::reloptkind, and root.
Referenced by check_index_predicates(), and generate_implied_equalities_for_column().
| RelOptInfo * find_join_rel | ( | PlannerInfo * | root, |
| Relids | relids | ||
| ) |
Definition at line 642 of file relnode.c.
References bms_equal(), build_join_rel_hash(), HASH_FIND, hash_search(), JoinHashEntry::join_rel, lfirst, list_length(), RelOptInfo::relids, and root.
Referenced by build_child_join_rel(), build_join_rel(), examine_variable(), find_join_input_rel(), get_matching_part_pairs(), and postgresPlanDirectModify().
| ParamPathInfo * find_param_path_info | ( | RelOptInfo * | rel, |
| Relids | required_outer | ||
| ) |
Definition at line 2011 of file relnode.c.
References bms_equal(), lfirst, ParamPathInfo::ppi_req_outer, and RelOptInfo::ppilist.
Referenced by get_appendrel_parampathinfo(), get_baserel_parampathinfo(), get_joinrel_parampathinfo(), and reparameterize_path_by_child().
| ParamPathInfo * get_appendrel_parampathinfo | ( | RelOptInfo * | appendrel, |
| Relids | required_outer | ||
| ) |
Definition at line 1978 of file relnode.c.
References Assert(), bms_is_empty, bms_is_subset(), bms_overlap(), find_param_path_info(), lappend(), RelOptInfo::lateral_relids, makeNode, NIL, ParamPathInfo::ppi_clauses, ParamPathInfo::ppi_req_outer, ParamPathInfo::ppi_rows, ParamPathInfo::ppi_serials, RelOptInfo::ppilist, and RelOptInfo::relids.
Referenced by create_append_path().
| ParamPathInfo * get_baserel_parampathinfo | ( | PlannerInfo * | root, |
| RelOptInfo * | baserel, | ||
| Relids | required_outer | ||
| ) |
Definition at line 1667 of file relnode.c.
References Assert(), bms_add_member(), bms_is_empty, bms_is_subset(), bms_overlap(), bms_union(), find_param_path_info(), generate_join_implied_equalities(), get_parameterized_baserel_size(), join_clause_is_movable_into(), RelOptInfo::joininfo, lappend(), RelOptInfo::lateral_relids, lfirst, list_concat(), makeNode, NIL, ParamPathInfo::ppi_clauses, ParamPathInfo::ppi_req_outer, ParamPathInfo::ppi_rows, ParamPathInfo::ppi_serials, RelOptInfo::ppilist, RelOptInfo::relids, RestrictInfo::rinfo_serial, and root.
Referenced by create_append_path(), create_bitmap_and_path(), create_bitmap_heap_path(), create_bitmap_or_path(), create_ctescan_path(), create_foreignscan_path(), create_functionscan_path(), create_gather_merge_path(), create_gather_path(), create_index_path(), create_namedtuplestorescan_path(), create_resultscan_path(), create_samplescan_path(), create_seqscan_path(), create_subqueryscan_path(), create_tablefuncscan_path(), create_tidrangescan_path(), create_tidscan_path(), create_valuesscan_path(), create_worktablescan_path(), postgresGetForeignPaths(), and reparameterize_path().
| ParamPathInfo * get_joinrel_parampathinfo | ( | PlannerInfo * | root, |
| RelOptInfo * | joinrel, | ||
| Path * | outer_path, | ||
| Path * | inner_path, | ||
| SpecialJoinInfo * | sjinfo, | ||
| Relids | required_outer, | ||
| List ** | restrict_clauses | ||
| ) |
Definition at line 1781 of file relnode.c.
References Assert(), bms_is_empty, bms_is_subset(), bms_overlap(), bms_union(), find_param_path_info(), generate_join_implied_equalities(), generate_join_implied_equalities_for_ecs(), get_parameterized_joinrel_size(), join_clause_is_movable_into(), RelOptInfo::joininfo, lappend(), RelOptInfo::lateral_relids, lfirst, list_concat(), makeNode, NIL, PATH_REQ_OUTER, ParamPathInfo::ppi_clauses, ParamPathInfo::ppi_req_outer, ParamPathInfo::ppi_rows, ParamPathInfo::ppi_serials, RelOptInfo::ppilist, RelOptInfo::relids, and root.
Referenced by create_hashjoin_path(), create_mergejoin_path(), and create_nestloop_path().
Definition at line 2032 of file relnode.c.
References Assert(), bms_add_member(), bms_add_members(), bms_copy(), bms_int_members(), get_param_path_clause_serials(), JoinPath::innerjoinpath, IsA, JoinPath::joinrestrictinfo, lfirst, list_head(), JoinPath::outerjoinpath, RestrictInfo::rinfo_serial, subpath(), and AppendPath::subpaths.
Referenced by create_nestloop_path(), and get_param_path_clause_serials().
| Relids min_join_parameterization | ( | PlannerInfo * | root, |
| Relids | joinrelids, | ||
| RelOptInfo * | outer_rel, | ||
| RelOptInfo * | inner_rel | ||
| ) |
Definition at line 1145 of file relnode.c.
References bms_del_members(), bms_union(), and RelOptInfo::lateral_relids.
Referenced by build_join_rel(), and join_is_legal().
| bool path_is_reparameterizable_by_child | ( | Path * | path, |
| RelOptInfo * | child_rel | ||
| ) |
Definition at line 4315 of file pathnode.c.
References BitmapHeapPath::bitmapqual, BitmapAndPath::bitmapquals, BitmapOrPath::bitmapquals, bms_overlap(), CustomPath::custom_paths, ForeignPath::fdw_outerpath, JoinPath::innerjoinpath, nodeTag, JoinPath::outerjoinpath, PATH_REQ_OUTER, REJECT_IF_PATH_LIST_NOT_REPARAMETERIZABLE, REJECT_IF_PATH_NOT_REPARAMETERIZABLE, MaterialPath::subpath, MemoizePath::subpath, GatherPath::subpath, AppendPath::subpaths, and RelOptInfo::top_parent_relids.
Referenced by pathlist_is_reparameterizable_by_child(), try_nestloop_path(), and try_partial_nestloop_path().
| Path * reparameterize_path | ( | PlannerInfo * | root, |
| Path * | path, | ||
| Relids | required_outer, | ||
| double | loop_count | ||
| ) |
Definition at line 3853 of file pathnode.c.
References MemoizePath::binary_mode, BitmapHeapPath::bitmapqual, bms_is_subset(), cost_index(), create_append_path(), create_bitmap_heap_path(), create_material_path(), create_memoize_path(), create_resultscan_path(), create_samplescan_path(), create_seqscan_path(), create_subqueryscan_path(), MemoizePath::est_calls, get_baserel_parampathinfo(), MemoizePath::hash_operators, i, IsA, lappend(), lfirst, makeNode, NIL, Path::parallel_aware, Path::parallel_workers, MemoizePath::param_exprs, IndexPath::path, SubqueryScanPath::path, AppendPath::path, PATH_REQ_OUTER, Path::pathkeys, Path::pathtype, reparameterize_path(), root, MemoizePath::singlerow, subpath(), SubqueryScanPath::subpath, MaterialPath::subpath, MemoizePath::subpath, AppendPath::subpaths, and Path::total_cost.
Referenced by get_cheapest_parameterized_child_path(), and reparameterize_path().
| Path * reparameterize_path_by_child | ( | PlannerInfo * | root, |
| Path * | path, | ||
| RelOptInfo * | child_rel | ||
| ) |
Definition at line 4019 of file pathnode.c.
References ADJUST_CHILD_ATTRS, adjust_child_relids_multilevel(), Assert(), BitmapHeapPath::bitmapqual, BitmapAndPath::bitmapquals, BitmapOrPath::bitmapquals, bms_copy(), bms_free(), bms_overlap(), copy_pathtarget(), CustomPath::custom_paths, CustomPath::custom_private, CustomPath::custom_restrictinfo, ForeignPath::fdw_outerpath, ForeignPath::fdw_private, ForeignPath::fdw_restrictinfo, find_param_path_info(), GetMemoryChunkContext(), IndexPath::indexclauses, IndexPath::indexinfo, IndexOptInfo::indrestrictinfo, JoinPath::innerjoinpath, JoinPath::joinrestrictinfo, lappend(), makeNode, MemoryContextSwitchTo(), CustomPath::methods, nodeTag, JoinPath::outerjoinpath, MemoizePath::param_exprs, BitmapHeapPath::path, ForeignPath::path, CustomPath::path, HashPath::path_hashclauses, MergePath::path_mergeclauses, PATH_REQ_OUTER, Path::pathtype, planner_rt_fetch, ParamPathInfo::ppi_clauses, ParamPathInfo::ppi_req_outer, ParamPathInfo::ppi_rows, ParamPathInfo::ppi_serials, RelOptInfo::ppilist, REPARAMETERIZE_CHILD_PATH, REPARAMETERIZE_CHILD_PATH_LIST, CustomPathMethods::ReparameterizeCustomPathByChild, root, RTE_RELATION, RangeTblEntry::rtekind, MaterialPath::subpath, MemoizePath::subpath, GatherPath::subpath, AppendPath::subpaths, RangeTblEntry::tablesample, and RelOptInfo::top_parent_relids.
Referenced by create_nestloop_plan(), and reparameterize_pathlist_by_child().
| void set_cheapest | ( | RelOptInfo * | parent_rel | ) |
Definition at line 270 of file pathnode.c.
References Assert(), BMS_DIFFERENT, BMS_EQUAL, BMS_SUBSET1, BMS_SUBSET2, bms_subset_compare(), RelOptInfo::cheapest_parameterized_paths, RelOptInfo::cheapest_startup_path, RelOptInfo::cheapest_total_path, cmp(), compare_path_costs(), compare_pathkeys(), elog, ERROR, IsA, lappend(), lcons(), lfirst, NIL, PATH_REQ_OUTER, Path::pathkeys, PATHKEYS_BETTER2, RelOptInfo::pathlist, STARTUP_COST, and TOTAL_COST.
Referenced by apply_scanjoin_target_to_paths(), create_distinct_paths(), create_grouping_paths(), create_ordinary_grouping_paths(), create_partial_distinct_paths(), create_partial_unique_paths(), create_partitionwise_grouping_paths(), create_unique_paths(), create_window_paths(), generate_partitionwise_join_paths(), mark_dummy_rel(), merge_clump(), postprocess_setop_rel(), query_planner(), set_dummy_rel_pathlist(), set_grouped_rel_pathlist(), set_rel_pathlist(), standard_join_search(), and subquery_planner().
| void setup_simple_rel_arrays | ( | PlannerInfo * | root | ) |
Definition at line 108 of file relnode.c.
References Assert(), AppendRelInfo::child_relid, elog, ERROR, lfirst, lfirst_node, list_length(), NIL, palloc0(), and root.
Referenced by plan_cluster_use_sort(), plan_create_index_workers(), plan_set_operations(), and query_planner().