For some reason unknown to me, Ubuntu decided to ship PostgreSQL 9.4 beta 3 instead of the stable version 9.3 with the release of Ubuntu 14.10 (which seems to be an odd decision to me).
Anyway, for all those of you who want to upgrade their existing PostgreSQL 9.3 cluster
to 9.4 on a freshly installed Ubuntu 14.10 (this article is not limited to Ubuntu 14.10, of course), here is how you do it using
pg_upgradecluster (you could also try upgrade using pg_upgrade which should
usually be faster, but never tried):