pgsql: Emit a warning when io_min_workers exceeds io_max_workers - Mailing list pgsql-committers

From Michael Paquier
Subject pgsql: Emit a warning when io_min_workers exceeds io_max_workers
Date
Msg-id E1wgZEA-001WjL-1g@gemulon.postgresql.org
Whole thread
List pgsql-committers
Emit a warning when io_min_workers exceeds io_max_workers

When io_min_workers is set strictly higher than io_max_workers, the
minimum has no effect since the pool will never grow past
io_max_workers.  Previously this was silently accepted, which could
be confusing for users expecting at least io_min_workers workers to
always be running.

In order to avoid noise in the server logs, the following restrictions
are in place:
- The only process printing the WARNING is the IO worker with ID 0, on
startup and reload, which is we know the only process always running
when using IO workers.
- At reload, the message shows only if one of the bounds has changed.

Note that this commit reuses a log message updated by 7905416eef9b.

Author: Baji Shaik <baji.pgdev@gmail.com>
Reviewed-by: Tristan Partin <tristan@partin.io>
Reviewed-by: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Discussion: https://postgr.es/m/CA+fm-RO_O7-XThg2qjj=ir35x9nOFbZYu07gttqAbM5T88QB4Q@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/9d1188f29865e66c4196578501e74e8c815fba8d

Modified Files
--------------
src/backend/storage/aio/method_worker.c | 34 +++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)


pgsql-committers by date:

Previous
From: Michael Paquier
Date:
Subject: pgsql: Improve checks and error messages of pgstat_register_kind()
Next
From: Richard Guo
Date:
Subject: pgsql: Fix qual pushdown past grouping with mismatched equivalence