Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XXY1Z-0006kP-D8 for pgsql-bugs@arkaria.postgresql.org; Fri, 26 Sep 2014 16:05:37 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XXY1Y-0001TQ-7l for pgsql-bugs@arkaria.postgresql.org; Fri, 26 Sep 2014 16:05:36 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XXXZu-0000iw-3I for pgsql-bugs@postgresql.org; Fri, 26 Sep 2014 15:37:02 +0000 Received: from mail-by2on0710.outbound.protection.outlook.com ([2a01:111:f400:fc0c::710] helo=na01-by2-obe.outbound.protection.outlook.com) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XXXZq-0007lk-0E for pgsql-bugs@postgresql.org; Fri, 26 Sep 2014 15:37:00 +0000 Received: from BN3PR0401MB1267.namprd04.prod.outlook.com (25.160.157.145) by BN3PR0401MB1394.namprd04.prod.outlook.com (25.161.209.153) with Microsoft SMTP Server (TLS) id 15.0.1039.15; Fri, 26 Sep 2014 15:36:51 +0000 Received: from BN3PR0401MB1265.namprd04.prod.outlook.com (25.160.157.143) by BN3PR0401MB1267.namprd04.prod.outlook.com (25.160.157.145) with Microsoft SMTP Server (TLS) id 15.0.1039.15; Fri, 26 Sep 2014 15:36:49 +0000 Received: from BN3PR0401MB1265.namprd04.prod.outlook.com ([25.160.157.143]) by BN3PR0401MB1265.namprd04.prod.outlook.com ([25.160.157.143]) with mapi id 15.00.1039.011; Fri, 26 Sep 2014 15:36:49 +0000 From: Nelson Page To: Michael Paquier , Tom Lane CC: Alvaro Herrera , "pgsql-bugs@postgresql.org" Subject: Re: BUG #11457: The below query crashes 9.3.5, but not 9.3.4 Thread-Topic: [BUGS] BUG #11457: The below query crashes 9.3.5, but not 9.3.4 Thread-Index: AQHP1PqKK04HO4q/X06HcIBxcSKyXpwNfPAQgACc3gCAAAMPgIAE8F4AgACHflA= Date: Fri, 26 Sep 2014 15:36:49 +0000 Message-ID: References: <20140920002314.2558.52018@wrigleys.postgresql.org> <4251b913e1464058b8e08d3e625bede3@BN3PR0401MB1265.namprd04.prod.outlook.com> <20140923035306.GD5311@eldon.alvh.no-ip.org> <5411.1411445043@sss.pgh.pa.us> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [173.164.170.51] x-microsoft-antispam: BCL:0;PCL:0;RULEID:;SRVR:BN3PR0401MB1267;UriScan:; x-forefront-prvs: 03468CBA43 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6009001)(24454002)(377454003)(199003)(13464003)(189002)(101416001)(76576001)(105586002)(76176999)(4396001)(99286002)(87936001)(92566001)(99396003)(2656002)(50986999)(77096002)(54356999)(33646002)(15202345003)(76482002)(97736003)(86362001)(81542003)(108616004)(15975445006)(107046002)(120916001)(10300001)(83072002)(46102003)(81342003)(79102003)(74502003)(93886004)(95666004)(66066001)(21056001)(85306004)(106116001)(77982003)(31966008)(80022003)(19580405001)(19580395003)(85852003)(83322001)(74316001)(20776003)(64706001)(74662003)(24736002); DIR:OUT; SFP:1102; SCL:1; SRVR:BN3PR0401MB1267; H:BN3PR0401MB1265.namprd04.prod.outlook.com; FPR:; MLV:sfv; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;SRVR:BN3PR0401MB1394; X-OriginatorOrg: dynamicsignal.com X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org 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 (unles= s the 9.1 you mention is some other context maybe?) Regards, Nelson -----Original Message----- From: Michael Paquier [mailto:michael.paquier@gmail.com]=20 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 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 introd= ucing. > I was poking at that one earlier this evening. The immediate fix is=20 > clear enough (generate_implied_equalities_for_column should be=20 > considering "grandparent" appendrels), but I'm not sure yet whether we=20 > need to change the logic in generate_join_implied_equalities. I could reproduce it as well with the scripts previously sent, and this reg= ression has been introduced by a2db7b7 on REL9_3_STABLE, backpatched from a= 87c729 on master. Hence I imagine that this is reproducible down to 9.1. Al= so, looking at the code the additions in add_child_rel_equivalences to bypa= ss the case where parent is not mentioned in equivclass seems to be the roo= t cause of the regression. I have not come up yet with a patch fixing this issue though without introd= ucing regressions in other code paths... But I have been able at least to c= ome up with the attached minimalistic example to reproduce the problem. Som= ething similar to that could be part of a regression test to add in the fin= al patch. Regards, -- Michael --=20 Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs