Shouldn't pg_upgrade turn off vacuum cost delay when it vacuums the new cluster? Not talking about the post-analyze script, but when it runs vacuumdb to analyze and freeze before loading the new schema, in prepare_new_cluster()? Those run during downtime, so it seems like you'd want those to run as fast as possible.