ha: Only run the psql commands if postgresql is running on this node

Otherwise, we're subject to races where we reach that code before the
node hosting postgresql is fully configured to answer to psql.
add support for drbd in HA part