Re: BUG #14404: High row estimates when query uses master inherited tables

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Clinton Adams <clinton(dot)adams(at)gmail(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #14404: High row estimates when query uses master inherited tables
Date: 2016-11-02 19:53:10
Message-ID: 25623.1478116390@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

I wrote:
> Ah. So this must be something to do with the foreign-key-driven rowcount
> estimates we added in 9.6. Will look into it, thanks for the report!

I think the answer is that we failed to consider inheritance cases at all
while developing the aforementioned logic. For the moment, I've
band-aided this by disabling the FK estimation logic when either relation
is an inheritance parent. If you need a patch immediately, see

https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=23c6c437f98c996092c0adfad6152d9cc699c8b0

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Haribabu Kommi 2016-11-03 04:27:03 Re: [BUGS] BUG #14350: VIEW with INSTEAD OF INSERT TRIGGER and COPY. Missing feature or working as designed.
Previous Message Tom Lane 2016-11-02 18:45:24 Re: BUG #14404: High row estimates when query uses master inherited tables