Stop a Postgres restart (or error) taking the whole app down

Addresses #1854.
@janmeier don't we have connection validation for that?