Fedora changed major versions of the postgresql database package, meaning that all user databases have to migrated from the 9.4.x series that used to be the default, to the 9.5.x series that is the current upstream stable package.

Fedora 24 -> 9.5.3
Fedora 23 -> 9.4.5
Fedora 22 -> 9.4.1

The general plan is to use the postgres tool pg_upgrade, ie take a empty database created with the new database, and populate it with the data from the old database.

So, the first step is to install both the current postgres package, and the previous version of the postgres package from the older Fedora release. For this purposes, the 9.4.x series.