On Tue, 2009-01-20 at 11:03 +0200, Heikki Linnakangas wrote:
> > - Are there some conditions where whole-table-scanning vacuum is
> more
> > effective than vacuums using visibility map? If so, we should
> switch
> > to full-scan *automatically*, without relying on user
> configurations.
>
> Hmm, the only downside I can see is that skipping a page here and
> there could defeat the OS read-ahead. Perhaps we should call
> posix_fadvise(SEQUENTIAL) to compensate. Or, we could modify the logic
> to only skip pages when there's at least N consecutive pages that can
> be skipped.
I would rather we didn't skip any pages at all unless the gains are
significant. Skipping the odd page makes no difference from a
performance perspective but may have a robustness impact.
"Significant gains" should take into account the size of both heap and
indexes, and recognise that we still scan whole indexes in either case.
-- Simon Riggs www.2ndQuadrant.comPostgreSQL Training, Services and Support