diff options
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/nodes/pathnodes.h | 2 | ||||
| -rw-r--r-- | src/include/optimizer/cost.h | 10 | ||||
| -rw-r--r-- | src/include/optimizer/pathnode.h | 12 |
3 files changed, 19 insertions, 5 deletions
diff --git a/src/include/nodes/pathnodes.h b/src/include/nodes/pathnodes.h index 14ccfc1ac1c..540d021592e 100644 --- a/src/include/nodes/pathnodes.h +++ b/src/include/nodes/pathnodes.h @@ -1658,6 +1658,7 @@ typedef struct Path /* estimated size/costs for path (see costsize.c for more info) */ Cardinality rows; /* estimated number of result tuples */ + int disabled_nodes; /* count of disabled nodes */ Cost startup_cost; /* cost expended before fetching any tuples */ Cost total_cost; /* total cost (assuming all tuples fetched) */ @@ -3333,6 +3334,7 @@ typedef struct typedef struct JoinCostWorkspace { /* Preliminary cost estimates --- must not be larger than final ones! */ + int disabled_nodes; Cost startup_cost; /* cost expended before fetching any tuples */ Cost total_cost; /* total cost (assuming all tuples fetched) */ diff --git a/src/include/optimizer/cost.h b/src/include/optimizer/cost.h index 57861bfb446..854a782944a 100644 --- a/src/include/optimizer/cost.h +++ b/src/include/optimizer/cost.h @@ -108,35 +108,42 @@ extern void cost_resultscan(Path *path, PlannerInfo *root, RelOptInfo *baserel, ParamPathInfo *param_info); extern void cost_recursive_union(Path *runion, Path *nrterm, Path *rterm); extern void cost_sort(Path *path, PlannerInfo *root, - List *pathkeys, Cost input_cost, double tuples, int width, + List *pathkeys, int disabled_nodes, + Cost input_cost, double tuples, int width, Cost comparison_cost, int sort_mem, double limit_tuples); extern void cost_incremental_sort(Path *path, PlannerInfo *root, List *pathkeys, int presorted_keys, + int input_disabled_nodes, Cost input_startup_cost, Cost input_total_cost, double input_tuples, int width, Cost comparison_cost, int sort_mem, double limit_tuples); extern void cost_append(AppendPath *apath); extern void cost_merge_append(Path *path, PlannerInfo *root, List *pathkeys, int n_streams, + int input_disabled_nodes, Cost input_startup_cost, Cost input_total_cost, double tuples); extern void cost_material(Path *path, + int input_disabled_nodes, Cost input_startup_cost, Cost input_total_cost, double tuples, int width); extern void cost_agg(Path *path, PlannerInfo *root, AggStrategy aggstrategy, const AggClauseCosts *aggcosts, int numGroupCols, double numGroups, List *quals, + int input_disabled_nodes, Cost input_startup_cost, Cost input_total_cost, double input_tuples, double input_width); extern void cost_windowagg(Path *path, PlannerInfo *root, List *windowFuncs, WindowClause *winclause, + int input_disabled_nodes, Cost input_startup_cost, Cost input_total_cost, double input_tuples); extern void cost_group(Path *path, PlannerInfo *root, int numGroupCols, double numGroups, List *quals, + int input_disabled_nodes, Cost input_startup_cost, Cost input_total_cost, double input_tuples); extern void initial_cost_nestloop(PlannerInfo *root, @@ -171,6 +178,7 @@ extern void cost_gather(GatherPath *path, PlannerInfo *root, RelOptInfo *rel, ParamPathInfo *param_info, double *rows); extern void cost_gather_merge(GatherMergePath *path, PlannerInfo *root, RelOptInfo *rel, ParamPathInfo *param_info, + int input_disabled_nodes, Cost input_startup_cost, Cost input_total_cost, double *rows); extern void cost_subplan(PlannerInfo *root, SubPlan *subplan, Plan *plan); diff --git a/src/include/optimizer/pathnode.h b/src/include/optimizer/pathnode.h index f00bd55f393..1035e6560c1 100644 --- a/src/include/optimizer/pathnode.h +++ b/src/include/optimizer/pathnode.h @@ -27,11 +27,12 @@ extern int compare_fractional_path_costs(Path *path1, Path *path2, double fraction); extern void set_cheapest(RelOptInfo *parent_rel); extern void add_path(RelOptInfo *parent_rel, Path *new_path); -extern bool add_path_precheck(RelOptInfo *parent_rel, +extern bool add_path_precheck(RelOptInfo *parent_rel, int disabled_nodes, Cost startup_cost, Cost total_cost, List *pathkeys, Relids required_outer); extern void add_partial_path(RelOptInfo *parent_rel, Path *new_path); extern bool add_partial_path_precheck(RelOptInfo *parent_rel, + int disabled_nodes, Cost total_cost, List *pathkeys); extern Path *create_seqscan_path(PlannerInfo *root, RelOptInfo *rel, @@ -124,7 +125,8 @@ extern Path *create_worktablescan_path(PlannerInfo *root, RelOptInfo *rel, Relids required_outer); extern ForeignPath *create_foreignscan_path(PlannerInfo *root, RelOptInfo *rel, PathTarget *target, - double rows, Cost startup_cost, Cost total_cost, + double rows, int disabled_nodes, + Cost startup_cost, Cost total_cost, List *pathkeys, Relids required_outer, Path *fdw_outerpath, @@ -132,7 +134,8 @@ extern ForeignPath *create_foreignscan_path(PlannerInfo *root, RelOptInfo *rel, List *fdw_private); extern ForeignPath *create_foreign_join_path(PlannerInfo *root, RelOptInfo *rel, PathTarget *target, - double rows, Cost startup_cost, Cost total_cost, + double rows, int disabled_nodes, + Cost startup_cost, Cost total_cost, List *pathkeys, Relids required_outer, Path *fdw_outerpath, @@ -140,7 +143,8 @@ extern ForeignPath *create_foreign_join_path(PlannerInfo *root, RelOptInfo *rel, List *fdw_private); extern ForeignPath *create_foreign_upper_path(PlannerInfo *root, RelOptInfo *rel, PathTarget *target, - double rows, Cost startup_cost, Cost total_cost, + double rows, int disabled_nodes, + Cost startup_cost, Cost total_cost, List *pathkeys, Path *fdw_outerpath, List *fdw_restrictinfo, |
