Upgrade Postgres 9.3 to 9.4 after Ubuntu 14.04 to 14.10 upgrade
I had the same error, I figured that the error was happening during shutdown of old cluster, it actually caused the cluster not to shut down fully.

What worked for me was stopping the old cluster manually and only then performing an upgrade.

sudo service postgresql stop
sudo pg_upgradecluster 9.3 main