From: | Greg Stark <gsstark(at)mit(dot)edu> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, Florian Helmberger <fh(at)25th-floor(dot)com>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [ADMIN] pg_class reltuples/relpages not updated by autovacuum/vacuum |
Date: | 2011-05-29 02:42:51 |
Message-ID: | BANLkTi=6RYvEVfKn8ufPEf9meGVEu=fHsQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin pgsql-hackers |
On Sat, May 28, 2011 at 12:01 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> I also found that Greg was right in thinking that it would help if we
> tweaked lazy_scan_heap to not always scan the first
> SKIP_PAGES_THRESHOLD-1 pages even if they were
> all_visible_according_to_vm. That seemed to skew the results if those
> pages weren't representative. And, for the case of a useless manual
> vacuum on a completely clean table, it would cause the reltuples value
> to drift when there was no reason to change it at all.
You fixed the logic only for the first 32 pages which helps with the
skew. But really the logic is backwards in general. Instead of
counting how many missed opportunities for skipped pages we've seen in
the past we should read the bits for the next 32 pages in advance and
decide what to do before we read those pages.
--
greg
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2011-05-29 05:10:48 | Re: [ADMIN] pg_class reltuples/relpages not updated by autovacuum/vacuum |
Previous Message | Tom Lane | 2011-05-28 19:01:35 | Re: [ADMIN] pg_class reltuples/relpages not updated by autovacuum/vacuum |
From | Date | Subject | |
---|---|---|---|
Next Message | Greg Sabino Mullane | 2011-05-29 03:23:56 | Getting a bug tracker for the Postgres project |
Previous Message | Josh Kupershmidt | 2011-05-29 02:38:01 | psql: missing tab completions for COMMENT ON |