Re: Vacuum, visibility maps and SKIP_PAGES_THRESHOLD

From: Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com>
To: Greg Stark <gsstark(at)mit(dot)edu>
Cc: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Vacuum, visibility maps and SKIP_PAGES_THRESHOLD
Date: 2011-05-29 16:00:43
Message-ID: BANLkTikbAKJwT_CJCAc14UF5PJTUZhuf3w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, May 27, 2011 at 8:40 PM, Greg Stark <gsstark(at)mit(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavan Deolasee 2011-05-29 16:26:40 Re: [ADMIN] pg_class reltuples/relpages not updated by autovacuum/vacuum
Previous Message Tom Lane 2011-05-29 15:57:01 Re: [ADMIN] pg_class reltuples/relpages not updated by autovacuum/vacuum