fix postgresql connection