mirror of
https://github.com/postgres/postgres.git
synced 2026-02-15 00:33:54 -05:00
This commit contains the basic, system-wide, infrastructure for
io_method=worker. It does not yet actually execute IO, this commit just
provides the infrastructure for running IO workers, kept separate for easier
review.
The number of IO workers can be adjusted with a PGC_SIGHUP GUC. Eventually
we'd like to make the number of workers dynamically scale up/down based on the
current "IO load".
To allow the number of IO workers to be increased without a restart, we need
to reserve PGPROC entries for the workers unconditionally. This has been
judged to be worth the cost. If it turns out to be problematic, we can
introduce a PGC_POSTMASTER GUC to control the maximum number.
As io workers might be needed during shutdown, e.g. for AIO during the
shutdown checkpoint, a new PMState phase is added. IO workers are shut down
after the shutdown checkpoint has been performed and walsender/archiver have
shut down, but before the checkpointer itself shuts down. See also
|
||
|---|---|---|
| .. | ||
| backend_startup.c | ||
| cmdtag.c | ||
| dest.c | ||
| fastpath.c | ||
| Makefile | ||
| meson.build | ||
| postgres.c | ||
| pquery.c | ||
| utility.c | ||