From: Tom Lane <tgl@sss.pgh.pa.us>
To: Nathan Bossart <nathandbossart@gmail.com>
Cc: Peter Eisentraut <peter@eisentraut.org>
Cc: Andres Freund <andres@anarazel.de>
Cc: pgsql-hackers@lists.postgresql.org, "Imseih (AWS), Sami" <simseih@amazon.com>
Cc: Justin Pryzby <pryzby@telsasoft.com>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: allow changing autovacuum_max_workers without restarting
Date: Tue, 29 Apr 2025 13:31:55 -0400
Message-ID: <1052019.1745947915@sss.pgh.pa.us> (raw)
In-Reply-To: <1050120.1745947158@sss.pgh.pa.us>
References: <Z3xV_b3wp-XQR3Rm@nathan>
<7B8590B5-3A23-4CF6-B21D-4AA8C0177C2C@anarazel.de>
<1353350.1736202977@sss.pgh.pa.us>
<Z3xlNmC3qtwf1lz1@nathan>
<1359669.1736206603@sss.pgh.pa.us>
<Z3yVFfKG_RAh8FgP@nathan>
<1386858.1736220547@sss.pgh.pa.us>
<Z31jI10tLLd6thfu@nathan>
<de722583-4ba4-4063-bc41-e20684978116@eisentraut.org>
<713236.1745846094@sss.pgh.pa.us>
<aA-TlhU2ZoBBAqc-@nathan>
<15005c8c-7676-43b7-a440-787b101cfdf5@eisentraut.org>
<1050120.1745947158@sss.pgh.pa.us>
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.
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.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, nathandbossart@gmail.com, peter@eisentraut.org, andres@anarazel.de, simseih@amazon.com, pryzby@telsasoft.com
Subject: Re: allow changing autovacuum_max_workers without restarting
In-Reply-To: <1052019.1745947915@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox