diff options
author | Tomas Vondra | 2017-06-10 17:40:50 +0000 |
---|---|---|
committer | Tomas Vondra | 2017-06-10 17:40:50 +0000 |
commit | 90d1109aa3397c6beb50b12cd8e5364861037424 (patch) | |
tree | a9a99593a526c75d7cb53b921a75dfe2be23f57b /src/timezone/strftime.c | |
parent | 873c6a55b0374fd8ad4095970fe6f488418339d8 (diff) |
Restrict subplan nodes even for equal distributions
Many regression tests were failing because the expected plan contains
Remote Subquery Scan on all (datanode_1)
but we were producing
Remote Subquery Scan on any (datanode_1,datanode_2)
Both those plans are in fact valid (at least on replicated tables).
The difference is that in the first case the restriction was computed
in adjust_subplan_distribution() while in the second case this did not
happen (and instead will happen at execution time).
The restriction is not applied because adjust_subplan_distribution()
contains this condition
if (subd && !equal(subd, pathd))
{
... restrict execution nodes ...
}
In Postgres-XL 9.6 the two distributions happen to be equal in some
cases where where that was not the case in Postgres-XL 9.5. It's not
entirely clear why this happens (it seems to be another consequence
of the upper-planner pathification), but the consequence is that the
restriction code is skipped.
Removing the equal() call from the condition fixes all the regression
failures caused by plans switching between any/all restrictions. In
fact, this fixes all remaining regressions failures in five regression
suites: create_view, subselect, aggregates, rangefuncs, xc_having.
In the future, we will probably pathify adjust_subplan_distribution(),
i.e. we'll probably get rid of it entirely and compute the restriction
either when constructing the path or possibly defer it until execution
time. Before the upper-planner pathification this was not possible.
Diffstat (limited to 'src/timezone/strftime.c')
0 files changed, 0 insertions, 0 deletions