pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nelson Page <npage@dynamicsignal.com>
To: Michael Paquier <michael.paquier@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Alvaro Herrera <alvherre@2ndquadrant.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 15:36:49 +0000
Message-ID: <f447dea157014c72a67ebf481de7d047@BN3PR0401MB1265.namprd04.prod.outlook.com> (raw)
In-Reply-To: <CAB7nPqQ58v+fNny6D+04fmkT-YAUuo9XU-=nT6HjAWRf+TfaSg@mail.gmail.com>
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>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

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?)

Regards,
Nelson

-----Original Message-----
From: Michael Paquier [mailto:michael.paquier@gmail.com] 
Sent: Friday, September 26, 2014 12:29 AM
To: Tom Lane
Cc: Alvaro Herrera; Nelson Page; pgsql-bugs@postgresql.org
Subject: Re: [BUGS] BUG #11457: The below query crashes 9.3.5, but not 9.3.4

On Tue, Sep 23, 2014 at 1:04 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Hm, probably the same thing then as
> http://www.postgresql.org/message-id/2326379.AOuSqtNClj@klinga.prans.o
> rg
Yes, both cases are similar, with the use of two levels of relations introducing.

> 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.

I could reproduce it as well with the scripts previously sent, and this regression has been introduced by a2db7b7 on REL9_3_STABLE, backpatched from a87c729 on master. Hence I imagine that this is reproducible down to 9.1. Also, looking at the code the additions in add_child_rel_equivalences to bypass the case where parent is not mentioned in equivclass seems to be the root cause of the regression.

I have not come up yet with a patch fixing this issue though without introducing regressions in other code paths... But I have been able at least to come up with the attached minimalistic example to reproduce the problem. Something similar to that could be part of a regression test to add in the final patch.
Regards,
--
Michael


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (16+ messages)  latest in thread

Message-ID: <f447dea157014c72a67ebf481de7d047@BN3PR0401MB1265.namprd04.prod.outlook.com>
Permalink:  ../f447dea157014c72a67ebf481de7d047@BN3PR0401MB1265.namprd04.prod.outlook.com/
Also on:    postgresql.org/message-id/f447dea157014c72a67ebf481de7d047@BN3PR0401MB1265.namprd04.prod.outlook.com

 · 

reply

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: npage@dynamicsignal.com, michael.paquier@gmail.com, tgl@sss.pgh.pa.us, alvherre@2ndquadrant.com
  Subject: Re: BUG #11457: The below query crashes 9.3.5, but not 9.3.4
  In-Reply-To: <f447dea157014c72a67ebf481de7d047@BN3PR0401MB1265.namprd04.prod.outlook.com>
  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>

* 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