I'm wondering if it makes sense or is possible to achieve Postgres auto-reconnections. The idea is to listen in and ping the server to determine if the heart beat is active, if not it should attempt a reconnection. The goal is to constantly ensure that the db is live and operable.
So far I've managed to implement database/sql
and my ORM (sqlboiler) with an interval that pings however the ping for some reason doesn't detect a drop when I disable the db server. But when I reboot the Go app it knows that the connection isn't available! Weird.