Re: BUG #15005: ANALYZE can make pg_class.reltuples inaccurate.

From: David Gould <daveg(at)sonic(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, pgsql-bugs(at)lists(dot)postgresql(dot)org, Alina Alexeeva <alexeeva(at)adobe(dot)com>, Rajesh Bhatia <rajbhati(at)adobe(dot)com>, Arvind Kota <akota(at)adobe(dot)com>, Jothikanth R <jothikanth(dot)r(at)efrontier(dot)com>, Ullas Lakkur Raghavendra <lakkurra(at)adobe(dot)com>, tomas(dot)vondra(at)2ndquadrant(dot)com
Subject: Re: BUG #15005: ANALYZE can make pg_class.reltuples inaccurate.
Date: 2018-01-11 21:45:14
Message-ID: 20180111134514.5d018bd8@engels
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Thu, 11 Jan 2018 10:12:16 -0500
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)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(at)2ndquadrant(dot)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(at)sonic(dot)net
If simplicity worked, the world would be overrun with insects.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruce Momjian 2018-01-11 21:59:54 Re: [BUGS] BUG #14875: pg_createcluster fails to load --createclusterconf
Previous Message PG Bug reporting form 2018-01-11 21:16:42 BUG #15007: LIMIT not respected in sub-queries