reinitialize connection of postgres after losing it