database user "postgres" is not the install user
Specifically for homebrew postgresql installations, the default user for initdb is $USER -- so if you just followed the instructions initially and did something like
initdb /usr/local/var/postgres -E utf8
the install user is your Unix username. In my case it is 'rob', so just adding '-U rob' to the pg_upgrade works as well:
pg_upgrade -b /usr/local/Cellar/postgresql/9.5.4_1/bin -B /usr/local/Cellar/postgresql/9.6.2/bin -d /usr/local/var/postgres95 -D /usr/local/var/postgres -U rob
The old PostgreSQL cluster was obviously created with
initdb -U dimid
but the new cluster was istalled with a different superuser.
You have to create the new cluster with the same superuser name as the old one.