Re: BUG #15005: ANALYZE can make pg_class.reltuples inaccurate. - Mailing list pgsql-bugs

From David Gould
Subject Re: BUG #15005: ANALYZE can make pg_class.reltuples inaccurate.
Date
Msg-id 20180111134514.5d018bd8@engels
Whole thread Raw
In response to BUG #15005: ANALYZE can make pg_class.reltuples inaccurate.  (PG Bug reporting form <noreply@postgresql.org>)
List pgsql-bugs
On Thu, 11 Jan 2018 10:12:16 -0500
Tom Lane <tgl@sss.pgh.pa.us> wrote:

> Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> > David Gould wrote:  
> >> I've tracked down how this happens and created a reproduction script and a
> >> patch. Attached:  
> 
> > Great work.  Please make sure to register this as a bug fix in the
> > next commitfest.  
> 
> There's already an existing discussion about what seems to be the same
> issue, or at least a closely related one:
> 
> https://www.postgresql.org/message-id/flat/16db4468-edfa-830a-f921-39a50498e77e@2ndquadrant.com

Yes. I reviewed that thread, while I was researching. It is a related issue
but not the same. That one adds n_tup_dead to the reluples estimate after
vacuums. It amplifies the effect of this one which prevents analyze from
fixing reltuples.

-dg

-- 
David Gould                                   daveg@sonic.net
If simplicity worked, the world would be overrun with insects.


pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #15007: LIMIT not respected in sub-queries
Next
From: Bruce Momjian
Date:
Subject: Re: [BUGS] BUG #14875: pg_createcluster fails to load--createclusterconf