| From: | "Tristan Partin" <tristan(at)partin(dot)io> |
|---|---|
| To: | "Baji Shaik" <baji(dot)pgdev(at)gmail(dot)com> |
| Cc: | "PostgreSQL-development" <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: [PATCH] Warn when io_min_workers exceeds io_max_workers |
| Date: | 2026-06-22 22:30:10 |
| Message-ID: | DJFXMDXTRZVT.2J5K2ORQ6YG12@partin.io |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Mon Jun 22, 2026 at 9:21 PM UTC, Baji Shaik wrote:
> Hi,
>
> Setting io_min_workers to a value greater than io_max_workers is
> silently accepted, but the minimum has no effect and the worker pool
> never grows past io_max_workers. This can confuse users who expect at
> least io_min_workers workers to always be running.
>
> Compare with autovacuum which properly warns:
>
> WARNING: "autovacuum_max_workers" (3) should be less than or equal
> to "autovacuum_worker_slots" (1)
> DETAIL: The server will only start up to "autovacuum_worker_slots" (1)
> autovacuum workers at a given time.
>
> The attached patch adds check_io_worker_gucs() in
> storage/aio/method_worker.c that emits a WARNING similar to what
> autovacuum does for autovacuum_worker_slots vs autovacuum_max_workers:
>
> WARNING: "io_min_workers" (5) should be less than or equal to
> "io_max_workers" (3)
> DETAIL: The I/O worker pool will not exceed "io_max_workers" (3)
> workers.
>
> The check runs in IO worker 0 at startup and after each configuration
> reload.
Baji,
The code looks good. I wonder if we should add a test. I could not find
a similar test for autovacuum for what it's worth.
--
Tristan Partin
PostgreSQL Contributors Team
AWS (https://aws.amazon.com)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bharath Rupireddy | 2026-06-22 22:39:00 | Re: Add a hook for handling logical decoding messages on subscribers. |
| Previous Message | Kirk Wolak | 2026-06-22 22:17:14 | [PATCH v1] Allow excluded tables to remain in the pg_restore data-loading path for directory-format dumps |