added conditional host and pg_conn strings