News for hackers. Stuff that matters.
Re:PostgreSQL 11.3 and 10.8 by htn on Thursday May 09, 2019 @02:11PM (#19870658)
One option for automated health monitoring and failover is pglookout: https://github.com/aiven/pglookout
Re:PostgreSQL 11.3 and 10.8 by Izkata on Thursday May 09, 2019 @05:40PM (#19872704)
We use this, pgbouncer, and a bash script to link the two, for completely automated failover.

Queries done through pgbouncer just pause as if the query is really really slow when the db goes down, then when pglookout does the failover, the bash script switches pgbouncer's config and those pending queries are sent immediately.