From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Andrew Gierth <rhodiumtoad(at)postgresql(dot)org> |
Cc: | pgsql-committers <pgsql-committers(at)postgresql(dot)org> |
Subject: | Re: pgsql: Avoid having vacuum set reltuples to 0 on non-empty relations in |
Date: | 2017-03-17 13:30:42 |
Message-ID: | CA+TgmoZRayZPgv8Dw5Z=Qx_3H81Q0aK6kqkFOZ+3=kTmKkPY9Q@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
On Thu, Mar 16, 2017 at 6:39 PM, Andrew Gierth
<rhodiumtoad(at)postgresql(dot)org> wrote:
> Avoid having vacuum set reltuples to 0 on non-empty relations in the
> presence of page pins, which leads to serious estimation errors in the
> planner. This particularly affects small heavily-accessed tables,
> especially where locking (e.g. from FK constraints) forces frequent
> vacuums for mxid cleanup.
>
> Fix by keeping separate track of pages whose live tuples were actually
> counted vs. pages that were only scanned for freezing purposes. Thus,
> reltuples can only be set to 0 if all pages of the relation were
> actually counted.
>
> Backpatch to all supported versions.
>
> Per bug #14057 from Nicolas Baccelli, analyzed by me.
>
> Discussion: https://postgr.es/m/20160331103739.8956.94469@wrigleys.postgresql.org
In the department of nitpicks, we usually try to write commit messages
so that the first line is a summary line which stands alone, and then
there's a blank line, and then more follows. a la
https://chris.beams.io/posts/git-commit/#separate
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2017-03-17 13:36:50 | pgsql: Remove dead link. |
Previous Message | Peter Eisentraut | 2017-03-17 13:23:56 | pgsql: pageinspect: Add test for page_header function |