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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: lists(at)benjamindsmith(dot)com, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Crash in 9.4 Beta when partially collapsing left outer joins
Date: 2014-09-09 13:25:07
Message-ID: 7732.1410269107@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Michael Paquier <michael(dot)paquier(at)gmail(dot)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.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2014-09-09 13:28:11 Re: Advisory lock grant order
Previous Message Dmitriy Igrishin 2014-09-09 12:52:08 Re: Async IO HTTP server frontend for PostgreSQL