diff options
| author | David Rowley <drowley@postgresql.org> | 2021-04-01 13:33:23 +1300 |
|---|---|---|
| committer | David Rowley <drowley@postgresql.org> | 2021-04-01 13:33:23 +1300 |
| commit | 28b3e3905c982c42fb10ee800e6f881e9742c89d (patch) | |
| tree | 5368a84ddedf0c0da61fc9ec73ea148658821f0b /src/backend/optimizer/plan/createplan.c | |
| parent | b6002a796dc0bfe721db5eaa54ba9d24fd9fd416 (diff) | |
| download | postgresql-28b3e3905c982c42fb10ee800e6f881e9742c89d.tar.gz | |
Revert b6002a796
This removes "Add Result Cache executor node". It seems that something
weird is going on with the tracking of cache hits and misses as
highlighted by many buildfarm animals. It's not yet clear what the
problem is as other parts of the plan indicate that the cache did work
correctly, it's just the hits and misses that were being reported as 0.
This is especially a bad time to have the buildfarm so broken, so
reverting before too many more animals go red.
Discussion: https://postgr.es/m/CAApHDvq_hydhfovm4=izgWs+C5HqEeRScjMbOgbpC-jRAeK3Yw@mail.gmail.com
Diffstat (limited to 'src/backend/optimizer/plan/createplan.c')
| -rw-r--r-- | src/backend/optimizer/plan/createplan.c | 87 |
1 files changed, 0 insertions, 87 deletions
diff --git a/src/backend/optimizer/plan/createplan.c b/src/backend/optimizer/plan/createplan.c index 22f10fa339..a56936e0e9 100644 --- a/src/backend/optimizer/plan/createplan.c +++ b/src/backend/optimizer/plan/createplan.c @@ -91,9 +91,6 @@ static Result *create_group_result_plan(PlannerInfo *root, static ProjectSet *create_project_set_plan(PlannerInfo *root, ProjectSetPath *best_path); static Material *create_material_plan(PlannerInfo *root, MaterialPath *best_path, int flags); -static ResultCache *create_resultcache_plan(PlannerInfo *root, - ResultCachePath *best_path, - int flags); static Plan *create_unique_plan(PlannerInfo *root, UniquePath *best_path, int flags); static Gather *create_gather_plan(PlannerInfo *root, GatherPath *best_path); @@ -280,11 +277,6 @@ static Sort *make_sort_from_groupcols(List *groupcls, AttrNumber *grpColIdx, Plan *lefttree); static Material *make_material(Plan *lefttree); -static ResultCache *make_resultcache(Plan *lefttree, Oid *hashoperators, - Oid *collations, - List *param_exprs, - bool singlerow, - uint32 est_entries); static WindowAgg *make_windowagg(List *tlist, Index winref, int partNumCols, AttrNumber *partColIdx, Oid *partOperators, Oid *partCollations, int ordNumCols, AttrNumber *ordColIdx, Oid *ordOperators, Oid *ordCollations, @@ -461,11 +453,6 @@ create_plan_recurse(PlannerInfo *root, Path *best_path, int flags) (MaterialPath *) best_path, flags); break; - case T_ResultCache: - plan = (Plan *) create_resultcache_plan(root, - (ResultCachePath *) best_path, - flags); - break; case T_Unique: if (IsA(best_path, UpperUniquePath)) { @@ -1580,56 +1567,6 @@ create_material_plan(PlannerInfo *root, MaterialPath *best_path, int flags) } /* - * create_resultcache_plan - * Create a ResultCache plan for 'best_path' and (recursively) plans - * for its subpaths. - * - * Returns a Plan node. - */ -static ResultCache * -create_resultcache_plan(PlannerInfo *root, ResultCachePath *best_path, int flags) -{ - ResultCache *plan; - Plan *subplan; - Oid *operators; - Oid *collations; - List *param_exprs = NIL; - ListCell *lc; - ListCell *lc2; - int nkeys; - int i; - - subplan = create_plan_recurse(root, best_path->subpath, - flags | CP_SMALL_TLIST); - - param_exprs = (List *) replace_nestloop_params(root, (Node *) - best_path->param_exprs); - - nkeys = list_length(param_exprs); - Assert(nkeys > 0); - operators = palloc(nkeys * sizeof(Oid)); - collations = palloc(nkeys * sizeof(Oid)); - - i = 0; - forboth(lc, param_exprs, lc2, best_path->hash_operators) - { - Expr *param_expr = (Expr *) lfirst(lc); - Oid opno = lfirst_oid(lc2); - - operators[i] = opno; - collations[i] = exprCollation((Node *) param_expr); - i++; - } - - plan = make_resultcache(subplan, operators, collations, param_exprs, - best_path->singlerow, best_path->est_entries); - - copy_generic_path_info(&plan->plan, (Path *) best_path); - - return plan; -} - -/* * create_unique_plan * Create a Unique plan for 'best_path' and (recursively) plans * for its subpaths. @@ -6515,28 +6452,6 @@ materialize_finished_plan(Plan *subplan) return matplan; } -static ResultCache * -make_resultcache(Plan *lefttree, Oid *hashoperators, Oid *collations, - List *param_exprs, bool singlerow, uint32 est_entries) -{ - ResultCache *node = makeNode(ResultCache); - Plan *plan = &node->plan; - - plan->targetlist = lefttree->targetlist; - plan->qual = NIL; - plan->lefttree = lefttree; - plan->righttree = NULL; - - node->numKeys = list_length(param_exprs); - node->hashOperators = hashoperators; - node->collations = collations; - node->param_exprs = param_exprs; - node->singlerow = singlerow; - node->est_entries = est_entries; - - return node; -} - Agg * make_agg(List *tlist, List *qual, AggStrategy aggstrategy, AggSplit aggsplit, @@ -7123,7 +7038,6 @@ is_projection_capable_path(Path *path) { case T_Hash: case T_Material: - case T_ResultCache: case T_Sort: case T_IncrementalSort: case T_Unique: @@ -7169,7 +7083,6 @@ is_projection_capable_plan(Plan *plan) { case T_Hash: case T_Material: - case T_ResultCache: case T_Sort: case T_Unique: case T_SetOp: |
