Re: allow changing autovacuum_max_workers without restarting

From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter(at)eisentraut(dot)org>, Andres Freund <andres(at)anarazel(dot)de>, pgsql-hackers(at)lists(dot)postgresql(dot)org, "Imseih (AWS), Sami" <simseih(at)amazon(dot)com>, Justin Pryzby <pryzby(at)telsasoft(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: allow changing autovacuum_max_workers without restarting
Date: 2025-04-29 17:42:19
Message-ID: aBEPe-OHYbnNezTM@nathan
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Apr 29, 2025 at 01:31:55PM -0400, Tom Lane wrote:
> I wrote:
>> Andres seemed lukewarm about reverting 38da05346 or 6d0154196, so
>> I left it be for the moment. But I still feel the argument is good
>> that "these will do little except confuse future hackers". Barring
>> objection, I'll go revert them.
>
> Actually ... on looking again at 6d0154196 ("Lower default value of
> autovacuum_worker_slots in initdb as needed"), it doesn't look that
> silly. If we're unable to allocate max_connections = 100, turning
> it down while still insisting on 16 AV worker slots doesn't seem
> terribly sane. Maybe we'd choose a formula other than
> "(max_connections / 6)" if we were doing it afresh, but not scaling
> autovacuum_worker_slots at all doesn't seem like the best answer.

Fair point.

> So now I'm inclined to leave that one alone. I'd still revert
> 38da05346, which means the comment added by 6d0154196 needs some minor
> adjustments. But I think we can stick with the "(max_connections /
> 6)" formula --- it will produce 3 with trial_conns = 20, but that's
> enough.

Yup, as long as the lowest possible default is >= the default for
autovacuum_max_workers (3), we're good.

--
nathan

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2025-04-29 18:01:54 Re: Large expressions in indexes can't be stored (non-TOASTable)
Previous Message Nathan Bossart 2025-04-29 17:39:58 Re: Large expressions in indexes can't be stored (non-TOASTable)