[pgpool-committers: 5678] pgpool: Avoid exit/fork storm of pool_worker_child process.

Tatsuo Ishii ishii at sraoss.co.jp
Sun Apr 21 16:12:16 JST 2019


Avoid exit/fork storm of pool_worker_child process.

pool_worker_child issues query to get WAL position using do_query(),
which could throws FATAL error. In this case pool_worker_child process
exits and Pgpool-II parent immediately forks new process. This cycle
indefinitely repeats and gives high load to the system.

This could easily happen. For example if ALWAYS_MASTER flag is
mistakenly set to standby node, it will cause an error:

ERROR:  recovery is in progress
HINT:  WAL control functions cannot be executed during recovery.
STATEMENT:  SELECT pg_current_wal_lsn()

To avoid the exit/fork storm, sleep sr_check_period.

Branch
------
V3_7_STABLE

Details
-------
https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=5085343b271aecd6e25ed587c11d61659fb9b13e

Modified Files
--------------
src/protocol/pool_process_query.c | 9 +++++++++
1 file changed, 9 insertions(+)



More information about the pgpool-committers mailing list