1.6.0
If a host doesn't respond to a request, it could mean either a temporary issue or that the host is actually down.
To avoid marking a host as dead prematurely, a host is only considered dead after pg_status__max_fails attempts.
To speed up our reaction to possible host unavailability, if a host doesn't respond and the number of attempts
hasn't yet exceeded pg_status__max_fails, we mark it as possibly dead, and this affects which hosts get returned:
- If the current master is marked as possibly dead and there’s already a new master, we immediately switch to the new master.
- When selecting a replica, preference is given to live hosts. However, if no live replicas meet a search criteria, a
potentially dead replica will be returned. This means that for up topg_status__max_failsattempts, the
fairness of load balancing between replicas can be disrupted.