pg_auto_failover
pg_auto_failover copied to clipboard
Add rules for the monitor to pg_hba.conf on the secondary
When we enable pg_auto_failover for an existing postgres cluster, the pg_hba.conf on standby hasn't the following 2 rules compared with that of the primary.
host(ssl) all "pgautofailover_monitor" _host_ trust # Auto-generated by pg_auto_failover
host(ssl) "postgres" _user_ _host_ trust # Auto-generated by pg_auto_failover
As a result, the health check connection for the secondary continuously generates FATAL message:
FATAL: no pg_hba.conf entry for host "10.123.119.3", \
user "pgautofailover_monitor", database "postgres", SSL off
This patch adds the access rule for the monitor on secondary, so the health check connection will gracefully exit.
Sounds reasonable, I'll take some time to update the PR.