0

Yesterday I upgraded my Fedora from 19 to 20. And now I cannot start PostgreSQL because of old database format. The steps are:

1.

# systemctl start postgresql

Job for postgresql.service failed. See 'systemctl status postgresql.service' and 'journalctl -xn' for details.

2.

# journalctl -xn

postgresql-check-db-dir[30869]: An old version of the database format was found.                                                                                                                             
postgresql-check-db-dir[30869]: Use "postgresql-setup upgrade" to upgrade to version 9.3.                                                                                                                    
postgresql-check-db-dir[30869]: See /usr/share/doc/postgresql/README.rpm-dist for more information.                                                                                                          
postgresql.service: control process exited, code=exited status=1                                                                                                                                 
systemd[1]: Failed to start PostgreSQL database server.   

3.

#postgresql-setup upgrade                                

Please install the postgresql-upgrade RPM.

4.

#yum install postgresql-upgrade

Загружены модули: auto-update-debuginfo, langpacks, refresh-packagekit                                                                                  
pgdg93   |   3.6 kB  00:00:00     
rpmfusion-free-updates   |   3.3 kB  00:00:00     
rpmfusion-free-updates-debuginfo   |   2.7 kB  00:00:00     
rpmfusion-nonfree-updates   |   3.3 kB  00:00:00     
rpmfusion-nonfree-updates-debuginfo   |   2.7 kB  00:00:00     
updates/20/x86_64/metalink   |   28 kB  00:00:00     
updates-debuginfo/20/x86_64/metalink   |   24 kB  00:00:00     
pgdg93/20/x86_64/primary_db   |   77 kB  00:00:00     
rpmfusion-nonfree-updates/20/x86_64/primary_db  

Package postgresql-upgrade not found.

What am I doing wrong? Is repo too old?

1
  • Please show rpm -qi postgresql Commented Jan 20, 2015 at 12:23

1 Answer 1

1

I checked my local Fedora mirror and the postgresql-upgrade RPM is certainly present in the Fedora 20 and 21 repos.

/srv/www/mirrors/fedora/releases/20/Everything/x86_64/os/Packages/p/postgresql-upgrade-9.3.1-2.fc20.x86_64.rpm
/srv/www/mirrors/fedora/releases/21/Everything/x86_64/os/Packages/p/postgresql-upgrade-9.3.5-4.fc21.x86_64.rpm

So I suspect you've hit a bad or out-of-sync mirror site. You can run yum clean all and try again to see if you get a different mirror site.

This may also be caused by your having the pgdg93 repository installed. Since Fedora already has PostgreSQL 9.3, there seems little point to having this, and its packages are probably causing conflict.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .