It's doubly bad with postgres because the statistics get wiped after running pg_upgrade. They do tell you to run ANALYZE afterwards but that's yet more downtime.
That's not great, do the bucket counts change or something between versions? It seems like statistics would be a thing that ... should not change while you are not looking!