get_baserel_parampathinfo previously assumed without checking that
the results of generate_join_implied_equalities "necessarily satisfy
join_clause_is_movable_into". This turns out to be wrong in the
presence of outer joins, because the generated clauses could include
Vars that mustn't be evaluated below a relevant outer join. That
led to applying clauses at the wrong plan level and possibly getting
incorrect query results. We must check each clause's nullable_relids,
and really the right thing to do is test join_clause_is_movable_into.
However, trying to fix it that way exposes an oversight in
equivclass.c: it wasn't careful about marking join clauses for
appendrel children with the correct clause_relids. That caused the
modified get_baserel_parampathinfo code to reject some clauses it
still needs to accept. (See parallel commit for HEAD/v16 for more
commentary about that.)
Per bug #18429 from Benoît Ryder. This misbehavior existed for
a long time before commit
|
||
---|---|---|
.. | ||
data | ||
expected | ||
input | ||
output | ||
sql | ||
.gitignore | ||
GNUmakefile | ||
Makefile | ||
README | ||
parallel_schedule | ||
pg_regress.c | ||
pg_regress.h | ||
pg_regress_main.c | ||
regress.c | ||
regressplans.sh | ||
resultmap | ||
serial_schedule | ||
standby_schedule |
README
Documentation concerning how to run these regression tests and interpret the results can be found in the PostgreSQL manual, in the chapter "Regression Tests".