opening postgres connection