Re: New IndexAM API controlling index vacuum strategies

From: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
To: Peter Geoghegan <pg(at)bowt(dot)ie>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: New IndexAM API controlling index vacuum strategies
Date: 2021-03-11 11:41:17
Message-ID: CAD21AoDcQOKKVAUs6DdTE51asm1POSXQAj1E_j7aerv9KU2tYA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Mar 3, 2021 at 12:40 PM Peter Geoghegan <pg(at)bowt(dot)ie> wrote:
>
> On Tue, Mar 2, 2021 at 6:44 PM Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> wrote:
> > A scale type parameter seems good to me but I wonder if how users can
> > tune that parameter. We already have tuple-based parameters such as
> > autovacuum_vacuum_scale_factor/threshold and I think that users
> > basically don't pay attention to that table updates result in how many
> > blocks.
>
> Fair. The scale thing was just a random suggestion, nothing to take
> too seriously.
>
> > The third idea is a VACUUM command option like DISABLE_PAGE_SKIPPING
> > to disable such skipping behavior. I imagine that the
> > user-controllable-option to enforce both heap vacuum and index vacuum
> > would be required also in the future when we have the vacuum strategy
> > feature (i.g., incremental vacuum).
>
> Yeah, I'm worried about conflicting requirements here -- this patch
> and the next patch (that pushes the same ideas further) might have
> different requirements.
>
> I think that this patch will mostly be useful in cases where there are
> very few LP_DEAD-containing heap pages, but consistently more than
> zero. So it's probably not easy to tune.
>
> What we might want is an on/off switch. But why? DISABLE_PAGE_SKIPPING
> was added because the freeze map work in 9.6 was considered high risk
> at the time, and we needed to have a tool to manage that risk. But
> this patch doesn't seem nearly as tricky. No?

I think the motivation behind on/off switch is similar. I was
concerned about a case where there is a bug or something so that we
mistakenly skip vacuums on heap and indexes. But this feature would
not be as complicated as freeze map and only skips the part of
changing LP_DEAD to LP_UNUSED I agree it seems not to be essential.

Regards,

--
Masahiko Sawada
EDB: https://www.enterprisedb.com/

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Julien Rouhaud 2021-03-11 11:42:56 Re: first add newly loaded plugin to the list then invoke _PG_init
Previous Message gkokolatos 2021-03-11 11:36:28 Re: Allow batched insert during cross-partition updates