Unfortunately, maybe I'm bitten by this. Not recorded (my bad!) but some pkga cannot be properly detected and causing mid-air crash, thus, reinstallations after deinstallations do not happen, thus, lost pkgs.And beware that it could remove a lot of your package, since it will de-install a lot a package before reinstalling them.
This happen to me, it de-install a bunch of package then it crashes. Letting me without 240 packages previously installed.
I habitally do dry-run before actual upgrade and check for "removed" to be exist or not. Nothing listed but many are deinstalled.
"Old school" bare-metal upgaring tools (at least ports-mgmt/portupgrade[-deve] and ports-mgmt/pkg_replace) historically backs up currently installed version before deinstallation, and if the installation of updated port somehow fails, delete the remnants of updated one and reinstalls currently installed version from the backup.
In my humble opinion, pkg(8) should do the same, too. At least make options to allow the behavior.