Re: BUG #11457: The below query crashes 9.3.5, but not 9.3.4

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Nelson Page <npage(at)dynamicsignal(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #11457: The below query crashes 9.3.5, but not 9.3.4
Date: 2014-09-23 04:04:03
Message-ID: 5411.1411445043@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Alvaro Herrera <alvherre(at)2ndquadrant(dot)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(at)entry=0x8c76b0 "!(!bms_overlap(appendrel->relids, required_outer))",
> errorType=errorType(at)entry=0x7a080c "FailedAssertion",
> fileName=fileName(at)entry=0x8c7470 "../../../../../../../../../../pgsql/source/REL9_3_STABLE/src/backend/optimizer/util/relnode.c",
> lineNumber=lineNumber(at)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Danny Gibson 2014-09-23 04:36:34 Error message
Previous Message Alvaro Herrera 2014-09-23 03:53:06 Re: BUG #11457: The below query crashes 9.3.5, but not 9.3.4