[New-Feature] Dynamic spare process management
authorMuhammad Usama <muhammad.usama@percona.com>
Wed, 9 Nov 2022 07:43:25 +0000 (12:43 +0500)
committerMuhammad Usama <muhammad.usama@percona.com>
Wed, 9 Nov 2022 07:43:25 +0000 (12:43 +0500)
commitce5e529c5bd9f19e3a23f92f7832f361ae361c48
tree2b9f83089ac502ae5d848ba955e22a327f6e8237
parentc453e7c33e7a74a496d216c4bc190f39a0d31ad8
[New-Feature] Dynamic spare process management

This feature allows selecting between static and dynamic process management modes.
Static process management is the same as the existing behavior of Pgpool-II, where it
spawns all child processes at startup. The new Dynamic mode keeps track of idle
processes and forks or kills processes to keep this number within
the specified boundaries.

Four new settings, process_management_mode,  process_management_strategy,
min_spare_children, and max_spare_children are added to configure the process
management behavior, while  process_management_strategy allows selecting
between three possible scaling-down strategies.

The first version of the patch was shared by "zhoujianshen at highgo.com" and reworked by me
Discussion: https://www.pgpool.net/pipermail/pgpool-hackers/2022-September/004189.html
Reviewed by: Bo Peng and Tatsuo Ishii
17 files changed:
doc/src/sgml/connection-settings.sgml
doc/src/sgml/runtime.sgml
src/auth/pool_auth.c
src/config/pool_config_variables.c
src/context/pool_process_context.c
src/include/main/pool_internal_comms.h
src/include/pcp/libpcp_ext.h
src/include/pool.h
src/include/pool_config.h
src/include/protocol/pool_connection_pool.h
src/main/pgpool_main.c
src/protocol/child.c
src/protocol/pool_connection_pool.c
src/sample/pgpool.conf.sample-stream
src/tools/pcp/pcp_frontend_client.c
src/utils/pool_process_reporting.c
src/watchdog/wd_json_data.c