Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1awAuv-0005jS-6W for pgsql-hackers@arkaria.postgresql.org; Fri, 29 Apr 2016 16:05:21 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1awAuu-0006IJ-Kj for pgsql-hackers@arkaria.postgresql.org; Fri, 29 Apr 2016 16:05:20 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1awAuu-0006ID-18 for pgsql-hackers@postgresql.org; Fri, 29 Apr 2016 16:05:20 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1awAup-0001h3-VS for pgsql-hackers@postgresql.org; Fri, 29 Apr 2016 16:05:19 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u3TG58OI017640; Fri, 29 Apr 2016 12:05:08 -0400 From: Tom Lane To: Julien Rouhaud cc: Michael Paquier , Stefan Huehner , PostgreSQL mailing lists , Tomas Vondra Subject: Re: pg9.6 segfault using simple query (related to use fk for join estimates) In-reply-to: <572384D7.1020602@dalibo.com> References: <20160429102531.GA13701@huehner.biz> <572384D7.1020602@dalibo.com> Comments: In-reply-to Julien Rouhaud message dated "Fri, 29 Apr 2016 17:59:19 +0200" Date: Fri, 29 Apr 2016 12:05:08 -0400 Message-ID: <17639.1461945908@sss.pgh.pa.us> X-Pg-Spam-Score: -2.9 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Julien Rouhaud writes: > The segfault is caused by quals_match_foreign_key() calling get_leftop() > and get_rightop() on a ScalarArrayOpExpr node. > Reordering the common fields of OpExpr and ScalarArrayOpExpr at the > beginning of the struct so the get_*op() work with either (as in > attached patch) fixes the issue. > I'm not sure that assuming this compatibility is the right way to fix > this though. It certainly isn't. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers