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

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

From
Alvaro Herrera
Date:
David Gould wrote:

> I've tracked down how this happens and created a reproduction script and a
> patch. Attached:
> 
> - vac_estimate_reltuples.patch     Patch against master
> - README.txt                       Instructions for testing
> - reltuples_analyze_bug.sql        Reproduction script
> - analyze_counts.awk               Helper for viewing results of test
> - test_standard.txt                Test output for unpatched postgresql 10.1
> - test_patched.txt                 Test output with patch

Great work.  Please make sure to register this as a bug fix in the
next commitfest.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


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

From
Tom Lane
Date:
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

            regards, tom lane