PostgreSQL – Upgrade version from PostgreSQL Yum Repository

The current available postgresql-server package in CentOS Yum Repository is 8.1.18. But my application needs postgresql-server 8.3. Luckily, PostgreSQL provides its own repository for upgrade. So Fedora, Redhat and CentOS users can upgrade by the following steps.

1. Pick the rpm of your desired postgresql version and platform at yum.pgsqlrpms.org

2. Download it and install the rpm


 

3. Run the yum install

  • yum install postgresql-server


 

4. Initialize the database

  • service postgresql initdb


 

* Please note that the above procedures is for new installation of PostgreSQL Server. If you are planning a upgrade with database migration. You have to dump the data of the old databases before the upgrade. And restore it after the upgrade is finished.

Reference: Using PostgreSQL YUM Repository in CentOS (Simplified Chinese)

Done =)

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.