diff options
| author | Tom Lane | 2021-02-01 19:43:54 +0000 |
|---|---|---|
| committer | Tom Lane | 2021-02-01 19:43:54 +0000 |
| commit | f003a7522bfa11177dc52c65eb97273a1057dfba (patch) | |
| tree | 592d19c634b7f8660ef186eccce9db4279e33555 /src/include | |
| parent | 5076f88bc985a7728eea337cbabae0e034b064b1 (diff) | |
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/include')
| -rw-r--r-- | src/include/nodes/pathnodes.h | 6 | ||||
| -rw-r--r-- | src/include/optimizer/pathnode.h | 5 | ||||
| -rw-r--r-- | src/include/partitioning/partprune.h | 1 |
3 files changed, 2 insertions, 10 deletions
diff --git a/src/include/nodes/pathnodes.h b/src/include/nodes/pathnodes.h index cde26377985..0ec93e648c4 100644 --- a/src/include/nodes/pathnodes.h +++ b/src/include/nodes/pathnodes.h @@ -1403,9 +1403,6 @@ typedef struct CustomPath typedef struct AppendPath { Path path; - List *partitioned_rels; /* List of Relids containing RT indexes of - * non-leaf tables for each partition - * hierarchy whose paths are in 'subpaths' */ List *subpaths; /* list of component Paths */ /* Index of first partial path in subpaths; list_length(subpaths) if none */ int first_partial_path; @@ -1430,9 +1427,6 @@ extern bool is_dummy_rel(RelOptInfo *rel); typedef struct MergeAppendPath { Path path; - List *partitioned_rels; /* List of Relids containing RT indexes of - * non-leaf tables for each partition - * hierarchy whose paths are in 'subpaths' */ List *subpaths; /* list of component Paths */ double limit_tuples; /* hard limit on output tuples, or -1 */ } MergeAppendPath; diff --git a/src/include/optimizer/pathnode.h b/src/include/optimizer/pathnode.h index 23dec14cbd3..8dfc36a4e15 100644 --- a/src/include/optimizer/pathnode.h +++ b/src/include/optimizer/pathnode.h @@ -67,13 +67,12 @@ extern AppendPath *create_append_path(PlannerInfo *root, RelOptInfo *rel, List *subpaths, List *partial_subpaths, List *pathkeys, Relids required_outer, int parallel_workers, bool parallel_aware, - List *partitioned_rels, double rows); + double rows); extern MergeAppendPath *create_merge_append_path(PlannerInfo *root, RelOptInfo *rel, List *subpaths, List *pathkeys, - Relids required_outer, - List *partitioned_rels); + Relids required_outer); extern GroupResultPath *create_group_result_path(PlannerInfo *root, RelOptInfo *rel, PathTarget *target, diff --git a/src/include/partitioning/partprune.h b/src/include/partitioning/partprune.h index 1f9544c0dcf..5f51e73a4d5 100644 --- a/src/include/partitioning/partprune.h +++ b/src/include/partitioning/partprune.h @@ -71,7 +71,6 @@ typedef struct PartitionPruneContext extern PartitionPruneInfo *make_partition_pruneinfo(struct PlannerInfo *root, struct RelOptInfo *parentrel, List *subpaths, - List *partitioned_rels, List *prunequal); extern Bitmapset *prune_append_rel_partitions(struct RelOptInfo *rel); extern Bitmapset *get_matching_partitions(PartitionPruneContext *context, |
