fix postgres reconnect error