[pgpool-committers: 49] pgpool: Allow health check retry while connect(). It is reported that
Tatsuo Ishii
ishii at postgresql.org
Sun Feb 19 21:51:13 JST 2012
Allow health check retry while connect(). It is reported that
connect() blocks sigalarm under some conditions, for example:
> When system is configured for security reasons not to return destination
> host unreachable messages ([pgpool-general: 131])
To enable this, following changes have been made. Part of changes are
contributed by Stevo Slavic.
- Make health_check_timer_expired to be global variable. This is set
when alarm is timed out in health checking process. The variable is
refered to by lower level functions such as
connect_inet_domain_socket_by_port().
- Modify connect_inet_domain_socket_by_port() so that it calls
connect(2) with non block socket. This allows to detect
health_check_timer_expired flag be set while retrying.
- Add retry parameter to make_persistent_db_connection(). The flag is
passed to connect_inet_domain_socket_by_port(). Retry = false is
used by health_check().
- Change pool_read2 etc. not to trigger failover if reading from
socket fails when fail_over_on_backend_error = off. Before
fail_over_on_backend_error is only refered to by socket writing
functions. But treating reading functions so is more consistent.
Branch
------
master
Details
-------
http://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=3d3fe8611b8a87e8787fc50272c59e40b28daff4
Modified Files
--------------
child.c | 8 ++++----
doc/pgpool-en.html | 9 ++++-----
main.c | 28 ++++++++++++++++++++++------
pgpool.conf.sample | 4 +---
pgpool.conf.sample-master-slave | 4 +---
pgpool.conf.sample-replication | 4 +---
pgpool.conf.sample-stream | 4 +---
pool.h | 6 ++----
pool_connection_pool.c | 20 ++++++++++++++++++--
pool_stream.c | 24 +++++++++++++++++-------
pool_worker_child.c | 2 +-
11 files changed, 72 insertions(+), 41 deletions(-)
More information about the pgpool-committers
mailing list