PostgreSQL replication monitoring and failover daemon