From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Nelson Page <npage@dynamicsignal.com>
Cc: Michael Paquier <michael.paquier@gmail.com>
Cc: pgsql-bugs@postgresql.org <pgsql-bugs@postgresql.org>
Subject: Re: BUG #11457: The below query crashes 9.3.5, but not 9.3.4
Date: Tue, 23 Sep 2014 00:04:03 -0400
Message-ID: <5411.1411445043@sss.pgh.pa.us> (raw)
In-Reply-To: <20140923035306.GD5311@eldon.alvh.no-ip.org>
References: <20140920002314.2558.52018@wrigleys.postgresql.org>
<CAB7nPqS7MXb2ENB=_EB0bwtM92eTbZOFwfz5MvZFy8GpRwuZYQ@mail.gmail.com>
<4251b913e1464058b8e08d3e625bede3@BN3PR0401MB1265.namprd04.prod.outlook.com>
<20140923035306.GD5311@eldon.alvh.no-ip.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, alvherre@2ndquadrant.com, npage@dynamicsignal.com, michael.paquier@gmail.com
Subject: Re: BUG #11457: The below query crashes 9.3.5, but not 9.3.4
In-Reply-To: <5411.1411445043@sss.pgh.pa.us>
References: <20140920002314.2558.52018@wrigleys.postgresql.org> <CAB7nPqS7MXb2ENB=_EB0bwtM92eTbZOFwfz5MvZFy8GpRwuZYQ@mail.gmail.com> <4251b913e1464058b8e08d3e625bede3@BN3PR0401MB1265.namprd04.prod.outlook.com> <20140923035306.GD5311@eldon.alvh.no-ip.org> <5411.1411445043@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox