Re: allow changing autovacuum_max_workers without restarting

Peter Eisentraut <peter@eisentraut.org>

From: Peter Eisentraut <peter@eisentraut.org>
To: Nathan Bossart <nathandbossart@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>
Cc: Andres Freund <andres@anarazel.de>, pgsql-hackers@lists.postgresql.org, "Imseih (AWS), Sami" <simseih@amazon.com>, Justin Pryzby <pryzby@telsasoft.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2025-04-28T11:55:48Z
Lists: pgsql-hackers
On 07.01.25 18:23, Nathan Bossart wrote:
> +	/*
> +	 * We chose the default for autovacuum_worker_slots during the
> +	 * max_connections tests above, but we print a progress message anyway.
> +	 */
> +	printf(_("selecting default \"autovacuum_worker_slots\" ... %d\n"),
> +		   n_av_slots);
> +

This initdb output seems, well, kinda fake, which it is by its own
admission.  Could we do this less fake maybe like this:

     selecting default "max_connections", "autovacuum_worker_slots" ... 100, 16

with the actual wait at the "..."?

(It doesn't seem impossible that someone will want to add more default
selecting for various worker or process slots, and this would allow adding
these easily, versus adding more "fake" output lines.)



Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Give up on running with NetBSD/OpenBSD's default semaphore settings.

  2. initdb: Do not report default autovacuum_worker_slots.

  3. Lower default value of autovacuum_worker_slots in initdb as needed.

  4. Allow changing autovacuum_max_workers without restarting.

  5. Reserve a PGPROC slot and semaphore for the slotsync worker process.

  6. Make archiver process an auxiliary process.

  7. Correct the formulas for System V IPC parameters SEMMNI and SEMMNS in docs.