| From: | Nathan Bossart <nathandbossart(at)gmail(dot)com> | 
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> | 
| Cc: | 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-01-07 17:23:47 | 
| Message-ID: | Z31jI10tLLd6thfu@nathan | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers | 
On Mon, Jan 06, 2025 at 10:29:07PM -0500, Tom Lane wrote:
> +1 for simplicity ... but on reflection, what do you think about
> using max_connections / 6?  That would keep autovacuum_worker_slots
> at 100 / 6 = 16 for the vast majority of systems.  For the worst case
> *BSD machines, we'd select 25 / 6 = 4 which results in consuming one
> more semaphore than where we were yesterday.  I'm willing to accept
> that outcome though, since we still have 3 or so to spare.
WFM. I'm kicking myself for not having thought of that...
> Other than the specific magic number, your patch LGTM.
Here's a new version of the patch with some small cosmetic changes
(including more commentary about the formula) and the constant changed to
6.  I'll go commit this shortly.
-- 
nathan
| Attachment | Content-Type | Size | 
|---|---|---|
| v3-0001-Lower-default-value-of-autovacuum_worker_slots-in.patch | text/plain | 5.6 KB | 
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Melanie Plageman | 2025-01-07 17:31:01 | Re: Moving the vacuum GUCs' docs out of the Client Connection Defaults section | 
| Previous Message | Melanie Plageman | 2025-01-07 17:15:17 | Re: Moving the vacuum GUCs' docs out of the Client Connection Defaults section |