Re: New GUC autovacuum_max_threshold ?

From: Frédéric Yhuel <frederic(dot)yhuel(at)dalibo(dot)com>
To: Nathan Bossart <nathandbossart(at)gmail(dot)com>, Melanie Plageman <melanieplageman(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com>, David Rowley <dgrowleyml(at)gmail(dot)com>
Subject: Re: New GUC autovacuum_max_threshold ?
Date: 2024-04-25 07:13:07
Message-ID: 1dafbd92-1c3d-469d-91f6-a0a2e47e4c08@dalibo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Nathan, thanks for your review.

Le 24/04/2024 à 21:57, Nathan Bossart a écrit :
> Yeah, I'm having trouble following the proposed mechanics for this new GUC,
> and it's difficult to understand how users would choose a value. If we
> just want to cap the number of tuples required before autovacuum takes
> action, perhaps we could simplify it to something like
>
> vacthresh = (float4) vac_base_thresh + vac_scale_factor * reltuples;
> vacthresh = Min(vacthres, vac_max_thresh);
>
> This would effectively cause autovacuum_vacuum_scale_factor to be
> overridden for large tables where the scale factor would otherwise cause
> the calculated threshold to be extremely high.

This would indeed work, and the parameter would be easier to define in
the user documentation. I prefer a continuous function... but that is
personal taste. It seems to me that autovacuum tuning is quite hard
anyway, and that it wouldn't be that much difficult with this kind of
asymptotic limit parameter.

But I think the most important thing is to avoid per-table configuration
for most of the users, or event autovacuum tuning at all, so either of
these two formulas would do.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Anthonin Bonnefoy 2024-04-25 07:17:52 Re: Fix parallel vacuum buffer usage reporting
Previous Message Heikki Linnakangas 2024-04-25 07:07:54 Re: Experiments with Postgres and SSL