When failed to read from backend socket (this could happen when wrong
health_check_user is specified), the health check process raises a
FATAL error in pool_read(), which causes death of health check
process. And Pgpool-II main forks off a new health check process. This
repeats forever.
Fix is, check the process type and it raises if the type is HEALTH
CHECK in addition to MAIN.
Back patch to 3.7 stable tree as well.
cp->socket_state = POOL_SOCKET_EOF;
if (cp->isbackend)
{
- if(processType == PT_MAIN)
+ if (processType == PT_MAIN || processType == PT_HEALTH_CHECK)
ereport(ERROR,
(errmsg("unable to read data from DB node %d",cp->db_node_id),
errdetail("EOF encountered with backend")));