The extended-statistics gap is the sneaky one, since the definition survives but pg_stats_ext is empty and estimates quietly drift until someone notices a plan regression. Would it make sense to add a post-upgrade assertion that every row in pg_statistic_ext has matching data in pg_statistic_ext_data, so it fails the pipeline instead of relying on someone remembering to run ANALYZE? Also curious whether you compared a few representative query plans before and after the vacuumdb step, not just the row estimates.