Postgres extension and service for automated failover and high-availability
https://github.com/hapostgres/pg_auto_failover