pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Clinton Adams <clinton.adams@gmail.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #14404: High row estimates when query uses master inherited tables
Date: Wed, 02 Nov 2016 15:53:10 -0400
Message-ID: <25623.1478116390@sss.pgh.pa.us> (raw)
In-Reply-To: <11482.1478112324@sss.pgh.pa.us>
References: <20161028200412.15987.96482@wrigleys.postgresql.org>
	<29426.1477704022@sss.pgh.pa.us>
	<CAEuopLZSgEGE9FCzZf+fE0v4qed_FuxeoJCOyjG7GUu1Lcgrog@mail.gmail.com>
	<11482.1478112324@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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=23c6c437f98c996092c0adfad6152d9cc...

			regards, tom lane


-- 
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 (5+ messages)

Message-ID: <25623.1478116390@sss.pgh.pa.us>
Permalink:  ../25623.1478116390@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/25623.1478116390@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, clinton.adams@gmail.com
  Subject: Re: BUG #14404: High row estimates when query uses master inherited tables
  In-Reply-To: <25623.1478116390@sss.pgh.pa.us>
  References: <20161028200412.15987.96482@wrigleys.postgresql.org> <29426.1477704022@sss.pgh.pa.us> <CAEuopLZSgEGE9FCzZf+fE0v4qed_FuxeoJCOyjG7GUu1Lcgrog@mail.gmail.com> <11482.1478112324@sss.pgh.pa.us> <25623.1478116390@sss.pgh.pa.us>

* 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