restore accidentally deleted line for saving pg connection