[pgpool-committers: 10563] pgpool: Enhance connecting process to backend.

Tatsuo Ishii ishii at postgresql.org
Fri Jun 13 10:27:18 JST 2025


Enhance connecting process to backend.

In certain environment (especially k8s), DNS look up is unstable and
connecting to backend process fails.  This occurs in call to
getaddrinfo() in connect_inet_domain_socket_by_port(). To enhance the
situation, retry up to 5 times (at each retry, sleep 1 second) if
getaddrinfo() fails with EAI_AGAIN. Note that if
connect_inet_domain_socket_by_port() is called with "retry" argument
is false, the retry will not happen. Health check calls
connect_inet_domain_socket_by_port() with the retry flag to false so
that retrying is controlled health check's own parameters.

Since up to now there's no similar issue reported, back patch to only
4.6 to make backpatching minimal.

Discussion: https://github.com/pgpool/pgpool2/issues/104
Backpatch-through: v4.6

Branch
------
V4_6_STABLE

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

Modified Files
--------------
src/protocol/pool_connection_pool.c | 34 ++++++++++++++++++++++++++++------
1 file changed, 28 insertions(+), 6 deletions(-)



More information about the pgpool-committers mailing list