PostgreSQL pg_upgrade --link mode performance issue after upgrade
After a pg_upgrade all your optimizer statistics are gone. You need to ANALYZE all of your tables.  This is true regardless of whether or not you use --link.