Re: [HACKERS] VACUUM and ANALYZE disagreeing on what reltuples means - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] VACUUM and ANALYZE disagreeing on what reltuples means
Date
Msg-id 14503.1521739732@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] VACUUM and ANALYZE disagreeing on what reltuples means  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Responses Re: [HACKERS] VACUUM and ANALYZE disagreeing on what reltuples means  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: [patch] BUG #15005: ANALYZE can make pg_class.reltuplesinaccurate.  (Justin Pryzby <pryzby@telsasoft.com>)
List pgsql-hackers
Tomas Vondra <tomas.vondra@2ndquadrant.com> writes:
> 0001 fixes this by tracking the number of actually indexed rows in the
> build states, just like in the other index AMs.
> A VACUUM or ANALYZE will fix the estimate, of course, but for tables
> that are not changing very much it may take quite a while. So I think
> this is something we definitely need to back-patch.

Agreed, and done.  I noticed a second bug in contrib/bloom, too: it'd
forget to write out the last index page if that contained only one
tuple, because the new-page code path in bloomBuildCallback failed to
increment the "count" field after clearing it.

> The 0002 part is the main part, unifying the definition of reltuples on
> three main places:

On to this part ...

            regards, tom lane


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Updating parallel.sgml's treatment of parallel joins
Next
From: Robert Haas
Date:
Subject: Re: Changing default value of wal_sync_method to open_datasync on Linux