Re: pg9.6 segfault using simple query (related to use fk for join estimates)

From: Julien Rouhaud <julien(dot)rouhaud(at)dalibo(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Stefan Huehner <stefan(at)huehner(dot)org>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>
Subject: Re: pg9.6 segfault using simple query (related to use fk for join estimates)
Date: 2016-04-29 16:40:04
Message-ID: 57238E64.8010702@dalibo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 29/04/2016 18:05, Tom Lane wrote:
> Julien Rouhaud <julien(dot)rouhaud(at)dalibo(dot)com> 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.
>

Agreed. New attached patch handles explicitly each node tag.

--
Julien Rouhaud
http://dalibo.com - http://dalibo.org

Attachment Content-Type Size
fix_opexpr.diff text/plain 1.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Joshua D. Drake 2016-04-29 16:40:35 Re: Lets (not) break all the things. Was: [pgsql-advocacy] 9.6 -> 10.0
Previous Message Merlin Moncure 2016-04-29 16:17:39 Re: Lets (not) break all the things. Was: [pgsql-advocacy] 9.6 -> 10.0