Heal check time out could happen in several places:
1) connect system call
2) select system call
3) read system call
1) was ok but in 2) and 3) it was possible that it could go into
infinite loop in Pgpool-II 3.7 or later. This was due to a mistake
when health check process was modified to be separate process in 3.7,
and back patched to 3.7 and above.
Discussion:
https://www.pgpool.net/pipermail/pgpool-hackers/2019-October/003458.html
https://www.pgpool.net/pipermail/pgpool-hackers/2019-October/003459.html
* pgpool: a language independent connection pool server for PostgreSQL
* written by Tatsuo Ishii
*
- * Copyright (c) 2003-2018 PgPool Global Development Group
+ * Copyright (c) 2003-2019 PgPool Global Development Group
*
* Permission to use, copy, modify, and distribute this software and
* its documentation for any purpose and without fee is hereby
save_errno = errno;
if (fds == -1)
{
- if (processType == PT_MAIN && processState == PERFORMING_HEALTH_CHECK && errno == EINTR && health_check_timer_expired)
+ if (processType == PT_HEALTH_CHECK && errno == EINTR && health_check_timer_expired)
{
ereport(WARNING,
(errmsg("health check timed out while waiting for reading data")));
if (readlen == -1)
{
+ if (processType == PT_HEALTH_CHECK && health_check_timer_expired && errno == EINTR)
+ {
+ ereport(ERROR,
+ (errmsg("health check timed out while waiting for reading data")));
+ return -1;
+ }
+
if (errno == EINTR || errno == EAGAIN)
{
ereport(DEBUG5,