Automatically set proper pg_host

For a setup with multiple release nodes database.yml should contain the IP of the database server (not string 'localhost').