The second is that the pg_upgrade test (when run with olddump/oldinstall) compares the before and after dumps, and if the "before" version is 17, then it will not have the relallfrozen argument to pg_restore_relation_stats. We might need a filtering step in adjust_new_dumpfile?
That sounds trickier.
Narrator: It was not trickier.
In light of v11-0001 being committed as 4694aedf63bf, I've rebased the remaining patches.