Re: Vacuum, visibility maps and SKIP_PAGES_THRESHOLD - Mailing list pgsql-hackers

From Pavan Deolasee
Subject Re: Vacuum, visibility maps and SKIP_PAGES_THRESHOLD
Date
Msg-id BANLkTikbAKJwT_CJCAc14UF5PJTUZhuf3w@mail.gmail.com
Whole thread Raw
In response to Re: Vacuum, visibility maps and SKIP_PAGES_THRESHOLD  (Greg Stark <gsstark@mit.edu>)
List pgsql-hackers
On Fri, May 27, 2011 at 8:40 PM, Greg Stark <gsstark@mit.edu> wrote:
>
> Separately it's a bit strange that we actually have to visit the
> pages. We have all the information we need in the VM to determine
> whether there's a run of 32 vacuum-clean pages. Why can't we look at
> the next 32 pages and if they're all vacuum-clean then skip looking at
> the heap at all for them. What we do now is do the regular vacuum
> algorithm and only after we've processed 32 pages in a row realize
> that it was a waste of effort.
>

May be we want to have visibility map APIs to test if a chunk of pages
are all visible or not. We can then use that API to test every N
blocks (where N is the number where continuous sequential scans would
still be better than sequential scans with gaps) and either read all
of them sequentially or just skip all of them.

Thanks,
Pavan

--
Pavan Deolasee
EnterpriseDB     http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [ADMIN] pg_class reltuples/relpages not updated by autovacuum/vacuum
Next
From: Pavan Deolasee
Date:
Subject: Re: [ADMIN] pg_class reltuples/relpages not updated by autovacuum/vacuum