From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Make real sure we don't reassociate joins into or out of SEMI/AN |
Date: | 2015-08-05 18:39:45 |
Message-ID: | E1ZN3bN-00087l-Ch@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Make real sure we don't reassociate joins into or out of SEMI/ANTI joins.
Per the discussion in optimizer/README, it's unsafe to reassociate anything
into or out of the RHS of a SEMI or ANTI join. An example from Piotr
Stefaniak showed that join_is_legal() wasn't sufficiently enforcing this
rule, so lock it down a little harder.
I couldn't find a reasonably simple example of the optimizer trying to
do this, so no new regression test. (Piotr's example involved the random
search in GEQO accidentally trying an invalid case and triggering a sanity
check way downstream in clause selectivity estimation, which did not seem
like a sequence of events that would be useful to memorialize in a
regression test as-is.)
Back-patch to all active branches.
Branch
------
REL9_1_STABLE
Details
-------
http://git.postgresql.org/pg/commitdiff/48d4f1e39df53ef3ab44fde2ff84ea778f672a9f
Modified Files
--------------
src/backend/optimizer/path/joinrels.c | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2015-08-05 19:21:22 | pgsql: Fix BRIN to use SnapshotAny during summarization |
Previous Message | Andres Freund | 2015-08-05 16:40:43 | pgsql: Fix typo in commit de6fd1c. |