Postgres extremely slow after upgrade from Version 10 to 11
The output of pg_upgrade includes this:

...

Upgrade Complete
----------------
Optimizer statistics are not transferred by pg_upgrade so,
once you start the new server, consider running:
    ./analyze_new_cluster.sh

...


We found horrible performance straight after the upgrade until we ran this, lesson learned to read the output :)