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/util/pathnode.c | |
parent | b6002a796dc0bfe721db5eaa54ba9d24fd9fd416 (diff) | |
download | postgresql-28b3e3905c982c42fb10ee800e6f881e9742c89d.tar.gz postgresql-28b3e3905c982c42fb10ee800e6f881e9742c89d.zip |
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/util/pathnode.c')
-rw-r--r-- | src/backend/optimizer/util/pathnode.c | 71 |
1 files changed, 0 insertions, 71 deletions
diff --git a/src/backend/optimizer/util/pathnode.c b/src/backend/optimizer/util/pathnode.c index b248b038e03..1c47a2fb49c 100644 --- a/src/backend/optimizer/util/pathnode.c +++ b/src/backend/optimizer/util/pathnode.c @@ -1577,56 +1577,6 @@ create_material_path(RelOptInfo *rel, Path *subpath) } /* - * create_resultcache_path - * Creates a path corresponding to a ResultCache plan, returning the - * pathnode. - */ -ResultCachePath * -create_resultcache_path(PlannerInfo *root, RelOptInfo *rel, Path *subpath, - List *param_exprs, List *hash_operators, - bool singlerow, double calls) -{ - ResultCachePath *pathnode = makeNode(ResultCachePath); - - Assert(subpath->parent == rel); - - pathnode->path.pathtype = T_ResultCache; - pathnode->path.parent = rel; - pathnode->path.pathtarget = rel->reltarget; - pathnode->path.param_info = subpath->param_info; - pathnode->path.parallel_aware = false; - pathnode->path.parallel_safe = rel->consider_parallel && - subpath->parallel_safe; - pathnode->path.parallel_workers = subpath->parallel_workers; - pathnode->path.pathkeys = subpath->pathkeys; - - pathnode->subpath = subpath; - pathnode->hash_operators = hash_operators; - pathnode->param_exprs = param_exprs; - pathnode->singlerow = singlerow; - pathnode->calls = calls; - - /* - * For now we set est_entries to 0. cost_resultcache_rescan() does all - * the hard work to determine how many cache entries there are likely to - * be, so it seems best to leave it up to that function to fill this field - * in. If left at 0, the executor will make a guess at a good value. - */ - pathnode->est_entries = 0; - - /* - * Add a small additional charge for caching the first entry. All the - * harder calculations for rescans are performed in - * cost_resultcache_rescan(). - */ - pathnode->path.startup_cost = subpath->startup_cost + cpu_tuple_cost; - pathnode->path.total_cost = subpath->total_cost + cpu_tuple_cost; - pathnode->path.rows = subpath->rows; - - return pathnode; -} - -/* * create_unique_path * Creates a path representing elimination of distinct rows from the * input data. Distinct-ness is defined according to the needs of the @@ -3919,17 +3869,6 @@ reparameterize_path(PlannerInfo *root, Path *path, apath->path.parallel_aware, -1); } - case T_ResultCache: - { - ResultCachePath *rcpath = (ResultCachePath *) path; - - return (Path *) create_resultcache_path(root, rel, - rcpath->subpath, - rcpath->param_exprs, - rcpath->hash_operators, - rcpath->singlerow, - rcpath->calls); - } default: break; } @@ -4148,16 +4087,6 @@ do { \ } break; - case T_ResultCachePath: - { - ResultCachePath *rcpath; - - FLAT_COPY_PATH(rcpath, path, ResultCachePath); - REPARAMETERIZE_CHILD_PATH(rcpath->subpath); - new_path = (Path *) rcpath; - } - break; - case T_GatherPath: { GatherPath *gpath; |