making pg available

I needed to make pg available in order to handle connection errors