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: Fri, 26 Sep 2014 12:57:18 -0400
Message-ID: <7269.1411750638@sss.pgh.pa.us> (raw)
In-Reply-To: <20140926154033.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>
<5411.1411445043@sss.pgh.pa.us>
<CAB7nPqQ58v+fNny6D+04fmkT-YAUuo9XU-=nT6HjAWRf+TfaSg@mail.gmail.com>
<f447dea157014c72a67ebf481de7d047@BN3PR0401MB1265.namprd04.prod.outlook.com>
<20140926154033.GD5311@eldon.alvh.no-ip.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> Nelson Page wrote:
>> As mentioned in the original title, we cannot reproduce this crash in 9.3.4, but can in 9.3.5. So our particular crash does not go back to 9.1 (unless the 9.1 you mention is some other context maybe?)
> Bug fixes are backpatched to supported branches; 9.3.4 is older than
> 9.1.14. 9.1.14 does contain the backpatched bug fix which seems to have
> introduced the new bug:
The Assert failure mentioned in the other thread reproduces for me back to
9.2; that one is contingent on trying to build a parameterized path, so
of course it wouldn't occur before 9.2. But I imagine other variants of
this issue can be reproduced further back. The fundamental problem is
that we still have work to do to make nested appendrels behave properly.
I think basically the issue here is that in some situations we really want
to find the top-level ancestor appendrel, not just the immediate parent,
as it is the top-level ancestor that will be mentioned in join clauses,
ORDER BY, etc.
I came across a closely related issue too: in
generate_join_implied_equalities_broken we try to translate original join
clauses to apply to a particular child rel by applying the Var translation
from the AppendRelInfo for that child. I think this is wrong for the same
reasons: the original join clause will mention top-level ancestor Vars,
meaning we need to successively apply all the translations working down to
the descendant if we want a correct result.
We could probably hack solutions to these problems without changing the
AppendRelInfo data structures, but I'm wondering if it wouldn't be a good
idea to redefine them or at least add more fields to make it easier to
work with multi-level appendrel ancestry.
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: <7269.1411750638@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> <CAB7nPqQ58v+fNny6D+04fmkT-YAUuo9XU-=nT6HjAWRf+TfaSg@mail.gmail.com> <f447dea157014c72a67ebf481de7d047@BN3PR0401MB1265.namprd04.prod.outlook.com> <20140926154033.GD5311@eldon.alvh.no-ip.org> <7269.1411750638@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