on any error, postgres closes connection (and reopens on next action)