aboutsummaryrefslogtreecommitdiff
path: root/src/backend/optimizer/util/pathnode.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2021-02-01 14:43:54 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2021-02-01 14:43:54 -0500
commitf003a7522bfa11177dc52c65eb97273a1057dfba (patch)
tree592d19c634b7f8660ef186eccce9db4279e33555 /src/backend/optimizer/util/pathnode.c
parent5076f88bc985a7728eea337cbabae0e034b064b1 (diff)
downloadpostgresql-f003a7522bfa11177dc52c65eb97273a1057dfba.tar.gz
postgresql-f003a7522bfa11177dc52c65eb97273a1057dfba.zip
Remove [Merge]AppendPath.partitioned_rels.
It turns out that the calculation of [Merge]AppendPath.partitioned_rels in allpaths.c is faulty and sometimes omits relevant non-leaf partitions, allowing an assertion added by commit a929e17e5a8 to trigger. Rather than fix that, it seems better to get rid of those fields altogether. We don't really need the info until create_plan time, and calculating it once for the selected plan should be cheaper than calculating it for each append path we consider. The preceding two commits did away with all use of the partitioned_rels values; this commit just mechanically removes the fields and the code that calculated them. Discussion: https://postgr.es/m/87sg8tqhsl.fsf@aurora.ydns.eu Discussion: https://postgr.es/m/CAJKUy5gCXDSmFs2c=R+VGgn7FiYcLCsEFEuDNNLGfoha=pBE_g@mail.gmail.com
Diffstat (limited to 'src/backend/optimizer/util/pathnode.c')
-rw-r--r--src/backend/optimizer/util/pathnode.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/backend/optimizer/util/pathnode.c b/src/backend/optimizer/util/pathnode.c
index 7aea30b306d..9be0c4a6af5 100644
--- a/src/backend/optimizer/util/pathnode.c
+++ b/src/backend/optimizer/util/pathnode.c
@@ -1217,7 +1217,7 @@ create_append_path(PlannerInfo *root,
List *subpaths, List *partial_subpaths,
List *pathkeys, Relids required_outer,
int parallel_workers, bool parallel_aware,
- List *partitioned_rels, double rows)
+ double rows)
{
AppendPath *pathnode = makeNode(AppendPath);
ListCell *l;
@@ -1249,7 +1249,6 @@ create_append_path(PlannerInfo *root,
pathnode->path.parallel_safe = rel->consider_parallel;
pathnode->path.parallel_workers = parallel_workers;
pathnode->path.pathkeys = pathkeys;
- pathnode->partitioned_rels = list_copy(partitioned_rels);
/*
* For parallel append, non-partial paths are sorted by descending total
@@ -1377,8 +1376,7 @@ create_merge_append_path(PlannerInfo *root,
RelOptInfo *rel,
List *subpaths,
List *pathkeys,
- Relids required_outer,
- List *partitioned_rels)
+ Relids required_outer)
{
MergeAppendPath *pathnode = makeNode(MergeAppendPath);
Cost input_startup_cost;
@@ -1394,7 +1392,6 @@ create_merge_append_path(PlannerInfo *root,
pathnode->path.parallel_safe = rel->consider_parallel;
pathnode->path.parallel_workers = 0;
pathnode->path.pathkeys = pathkeys;
- pathnode->partitioned_rels = list_copy(partitioned_rels);
pathnode->subpaths = subpaths;
/*
@@ -3847,7 +3844,6 @@ reparameterize_path(PlannerInfo *root, Path *path,
apath->path.pathkeys, required_outer,
apath->path.parallel_workers,
apath->path.parallel_aware,
- apath->partitioned_rels,
-1);
}
default: