[pgpool-committers: 3196] pgpool: Allow to access to pgpool while doing health checking
Tatsuo Ishii
ishii at postgresql.org
Thu May 5 14:49:45 JST 2016
Allow to access to pgpool while doing health checking
Currently any attempt to connect to pgpool fails if pgpool is doing
health check against failed node even if fail_over_on_backend_error is
off because pgpool child first tries to connect to all backend
including the failed one and exits if it fails to connect to a backend
(of course it fails). This is a temporary situation and will be
resolved before pgpool executes failover. However if the health check
is retrying, the temporary situation keeps longer depending on the
setting of health_check_max_retries and health_check_retry_delay. This
is not good. Attached patch tries to mitigate the problem:
- When an attempt to connect to backend fails, give up connecting to
the failed node and skip to other node, rather than exiting the
process if operating in streaming replication mode and the node is
not primary node.
- Mark the local status of the failed node to "down".
- This will let the primary node be selected as a load balance node
and every queries will be sent to the primary node. If there's other
healthy standby nodes, one of them will be chosen as the load
balance node.
- After the session is over, the child process will suicide to not
retain the local status.
Per [pgpool-hackers: 1531].
Branch
------
V3_4_STABLE
Details
-------
http://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=085e2b8aab93e298d648a9e5b974745de3044a46
Modified Files
--------------
src/include/pool.h | 1 +
src/protocol/pool_connection_pool.c | 34 ++++++++++++++++++++++++++++------
src/utils/pool_process_reporting.c | 2 +-
3 files changed, 30 insertions(+), 7 deletions(-)
More information about the pgpool-committers
mailing list