Unless something has radically changed with this last release, then the PostgreSQL database needs to be offline while pg_upgrade is running.