Disconnect/reconnect from the database before and after confirmation
The database connection is likely to timeout if the confirmation prompt stays on for too long. We should cut the connection before asking for confirmation and reconnect after that. Eventually asking for retry if it fails to reconnect (e.g. because VPN is down).