Re: Introduce some randomness to autovacuum - Mailing list pgsql-hackers

From Sami Imseih
Subject Re: Introduce some randomness to autovacuum
Date
Msg-id CAA5RZ0t0NJY4axqJj8kYiK1X5U+5ZqEs+7MA2Rm4u6FtrH4vbA@mail.gmail.com
Whole thread Raw
In response to Re: Introduce some randomness to autovacuum  (Greg Sabino Mullane <htamfids@gmail.com>)
Responses Re: Introduce some randomness to autovacuum
Re: Introduce some randomness to autovacuum
List pgsql-hackers
> Yes, it is masking the problem, but maybe a better way to think about it is that it is delaying the
> performance impact, allowing more time for a manual intervention of the problematic table(s).

I question how the user will gauge the success of setting the strategy
to "random"? They may make
it random by default, but fall into the same issues and revert it back
to the default strategy.

But also, the key as you mention is "manual intervention" which
requires proper monitoring. I will
argue that for the two cases that this proposal is seeking to correct,
we already have good
solutions that could be implemented by a user.

Let's take the "spinning" case again. If a table has some sort of
problem causing
vacuum to error out, one can just disable autovacuum on a per-table
level and correct
the issue. Also, the xmin horizon being held back ( which is claimed
to be the most common cause,
and I agree with that ), well that one is just going to cause all your
autovacuums to become
useless.

Also, I do think the starvation problem has a good answer now that
autovacuum_max_workers
can be modified online. Maybe something can be done for autovacuum to
auto-tune this
setting to give more workers at times when it's needed. Not sure what
that looks like,
but it is more possible now that this setting does not require a restart.

--
Sami Imseih
Amazon Web Services (AWS)



pgsql-hackers by date:

Previous
From: Sami Imseih
Date:
Subject: Improve explicit cursor handling in pg_stat_statements
Next
From: Jacob Champion
Date:
Subject: Re: [PoC] Federated Authn/z with OAUTHBEARER