Re: Crash in 9.4 Beta when partially collapsing left outer joins

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Crash in 9.4 Beta when partially collapsing left outer joins
Дата
Msg-id CAB7nPqRSRDF4d+gQQ2RhxgY2oaZd6QsBRfM2Ebms4r52syJh4g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Crash in 9.4 Beta when partially collapsing left outer joins  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Crash in 9.4 Beta when partially collapsing left outer joins  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On Tue, Sep 9, 2014 at 10:25 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Michael Paquier <michael.paquier@gmail.com> writes:
>> The logic for nested OR is correct by reading it, hence why not simply
>> removing the assertion failing? The attached patch 1 does so.
>
> The reason for the assert is that there should never be an OR directly
> underneath an OR in the planner after eval_const_expressions has flattened
> such cases.  Evidently commit f343a88 failed to preserve AND/OR flatness
> in some cases :-(.  That code should be taught to do so, rather than
> lobotomizing this assertion.  Lack of flatness causes optimization
> inefficiencies, which is why we don't want to just allow it.
Ah, OK, I just saw your commit. so the trick is to add the arguments
of subclause in case of an OR clause found to have a correct
flattening here... Thanks!
--
Michael


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

Предыдущее
От: Alban Hertroys
Дата:
Сообщение: Re: Convincing STABLE functions to run once
Следующее
От: David Boreham
Дата:
Сообщение: Re: Async IO HTTP server frontend for PostgreSQL