Technology Insights

Upgrade PostgreSQL 8.3 To PostgreSQL 8.4 On A CentOS Server Using Yum

I have been needing to upgrade the PostgreSQL servers at my work for awhile now and was finally forced to do so after needing some of the features available with PostgreSQL 8.4.X. Currently we are running PostgreSQL 8.3.10 which is super old but it is definitely not the latest stable release available. One thing I am looking forward to testing is the improvements to the vacuum process. Over the past two years I have become a lot more familiar with Postgres and one thing that has been disappointing is the downtime involved in reclaiming disk space via data removed from PSQL database tables. The full vacuum process, which is required to reclaim disk after deleting data from a table, in 8.3 requires a lock on tables which essentially causes downtime. When you are dealing with large tables over 10GB in size this can take days to complete. Follow the directions below to first backup all of your PostgreSQL data, remove the current PostgreSQL installation, and then install PostgreSQL 8.4 on a CentOS Linux server.

Technology Insights

Install the Latest PostgreSQL Yum Repository for CentOS

Keeping PostgreSQL updated via yum should be done via the pgdg yum repository supplied by pgsqlrpms.org. The latest CentOS PostgreSQL repo can be viewed here.   You will need to download the repo and then install using rpm as shown below. bash wget http://yum.pgsqlrpms.org/reporpms/8.4/pgdg-centos-8.4-1.noarch.rpm rpm -Uhv pgdg-centos-8.4-1.noarch.rpm Another helpful postgresql install and management link is located…