pgsql: Fix a thinko in join_is_legal: when we decide we can implement a

Поиск
Список
Период
Сортировка
От tgl@postgresql.org (Tom Lane)
Тема pgsql: Fix a thinko in join_is_legal: when we decide we can implement a
Дата
Msg-id 20090719203256.A032275331E@cvs.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Log Message:
-----------
Fix a thinko in join_is_legal: when we decide we can implement a semijoin
by unique-ifying the RHS and then inner-joining to some other relation,
that is not grounds for violating the RHS of some other outer join.
Noticed while regression-testing new GEQO code, which will blindly follow
any path that join_is_legal says is legal, and then complain later if that
leads to a dead end.

I'm not certain that this can result in any visible failure in 8.4: the
mistake may always be masked by the fact that subsequent attempts to join
the rest of the RHS of the other join will fail.  But I'm not certain it
can't, either, and it's definitely not operating as intended.  So back-patch.

The added regression test depends on the new no-failures-allowed logic
that I'm about to commit in GEQO, so no point back-patching that.

Tags:
----
REL8_4_STABLE

Modified Files:
--------------
    pgsql/src/backend/optimizer/path:
        joinrels.c (r1.100 -> r1.100.2.1)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/path/joinrels.c?r1=1.100&r2=1.100.2.1)

В списке pgsql-committers по дате отправления:

Предыдущее
От: tgl@postgresql.org (Tom Lane)
Дата:
Сообщение: pgsql: Fix a thinko in join_is_legal: when we decide we can implement a
Следующее
От: tgl@postgresql.org (Tom Lane)
Дата:
Сообщение: pgsql: Rewrite GEQO's gimme_tree function so that it always finds a