Re: BUG #11457: The below query crashes 9.3.5, but not 9.3.4 - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #11457: The below query crashes 9.3.5, but not 9.3.4
Date
Msg-id 5411.1411445043@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #11457: The below query crashes 9.3.5, but not 9.3.4  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: BUG #11457: The below query crashes 9.3.5, but not 9.3.4
List pgsql-bugs
Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> FWIW I can reproduce the crash in 9.3 HEAD with these scripts, so that's
> probably helpful enough.  Table "Article" (not sent) is referenced in an
> FK, but I just commented out that clause.  Backtrace is:

> #0  0x00007fd34d9ca1a5 in *__GI_raise (sig=<optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
> #1  0x00007fd34d9cd420 in *__GI_abort () at abort.c:92
> #2  0x0000000000768c27 in ExceptionalCondition (conditionName=conditionName@entry=0x8c76b0
"!(!bms_overlap(appendrel->relids,required_outer))",  
>     errorType=errorType@entry=0x7a080c "FailedAssertion",
>     fileName=fileName@entry=0x8c7470
"../../../../../../../../../../pgsql/source/REL9_3_STABLE/src/backend/optimizer/util/relnode.c", 
>     lineNumber=lineNumber@entry=953) at
../../../../../../../../../../pgsql/source/REL9_3_STABLE/src/backend/utils/error/assert.c:54

Hm, probably the same thing then as
http://www.postgresql.org/message-id/2326379.AOuSqtNClj@klinga.prans.org

I was poking at that one earlier this evening.  The immediate fix is clear
enough (generate_implied_equalities_for_column should be considering
"grandparent" appendrels), but I'm not sure yet whether we need to change
the logic in generate_join_implied_equalities.

In the meantime, the OP could probably dodge the problem by not nesting
the UNION ALLs like that ...

            regards, tom lane

pgsql-bugs by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: BUG #11457: The below query crashes 9.3.5, but not 9.3.4
Next
From: lecotegougdelaforce@free.fr
Date:
Subject: BUG #11474: [Documentation] Add a note about to_date() not accepting TM modifier