Re: decoupling table and index vacuum

From: Peter Geoghegan <pg(at)bowt(dot)ie>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: decoupling table and index vacuum
Date: 2021-04-24 20:39:03
Message-ID: CAH2-Wz=qP5NZQi6JTgst=JY62jqsaVDkB7gkGptaqjHiHfcrKA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Apr 24, 2021 at 1:17 PM Peter Geoghegan <pg(at)bowt(dot)ie> wrote:
> On Sat, Apr 24, 2021 at 12:56 PM Andres Freund <andres(at)anarazel(dot)de> wrote:
> > Imo the question isn't really whether criteria will ever do something
> > wrong, but how often and how consequential such mistakes will
> > be. E.g. unnecessarily vacuuming an index isn't fun, but it's better
> > than ending up not never cleaning up dead index pointers despite repeat
> > accesses (think bitmap scans).
>
> I strongly agree. The risk with what I propose is that we'd somehow
> overlook a relevant extreme cost. But I think that that's an
> acceptable risk.

IMV the goal here is not really to skip index vacuuming when it's
unnecessary. The goal is to do *more* index vacuuming when and where
it *is* necessary (in one problematic index among several) -- maybe
even much much more. We currently treat index vacuuming as an
all-or-nothing thing at the level of the table, which makes this
impossible.

This is another reason why we can be pretty conservative about
skipping. We only need to skip index vacuuming those indexes that
we're pretty confident just don't need it -- that's sufficient to be
able to do vastly more index vacuuming where it is needed in almost
all cases. There is some gray area, but that seems much less
interesting to me.

--
Peter Geoghegan

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Yura Sokolov 2021-04-24 22:27:24 Re: Use simplehash.h instead of dynahash in SMgr
Previous Message Peter Geoghegan 2021-04-24 20:17:22 Re: decoupling table and index vacuum