configuring hosts and postgres connection.