1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-26 01:22:12 +03:00

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 a929e17e5a 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
This commit is contained in:
Tom Lane
2021-02-01 14:43:54 -05:00
parent 5076f88bc9
commit f003a7522b
11 changed files with 31 additions and 187 deletions

View File

@ -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;