Usually, once you upgraded Postgres clusters, you would need to run ANALYZE on the whole cluster to make sure that the database statistics are up to date. Because you know that not doing it will make your database performance go VERY bad. And if you use pg_upgrade to perform the upgrade, there is a tiny little script you can call to do this analyze process, named analyze_new_cluster.sh in Linux and Unix environment and analyze_new_cluster.