Upgrading PostgreSQL on Cpanel 11 Server
Upgrading PostgreSQL 8.2 on Cpanel Server
*ANY ACTIONS YOU TAKE, YOU TAKE THEM AT YOUR OWN RESPONSABILITY*
Reason :
PostgreSQL 8.2 offers a huge performance increase pretty much across the board and few other fixes
Platforms:
RHEL 3,4,Centos 3.x,4.x, Fedora Core 5,6
Make sure if you have postgresql installed.
rpm -qa | grep postgres | tee /root/rpm_pgsql
The above will list all the installed postgresql rpm packages and store the output to /root/rpm_pgsql. You can use this list to remove all the postgresql related rpm later.
su postgres - mkdir backups pg_dumpall > /var/lib/pgsql/backups/postgresql_backup exit
exit will logout from the postgres user
/sbin/service postgresql stop
mv /var/lib/pgsql /var/lib/pgsql_old
rpm -e rh-postgresql-server rpm -e rh-postgresql rpm -e rh-postgresql-devel rpm -e rh-postgresql-python rpm -e rh-postgresql-libs rpm -e perl-DBD-Pg
postgresql-8.2.4-1PGDG.i686.rpm postgresql-contrib-8.2.4-1PGDG.i686.rpm postgresql-devel-8.2.4-1PGDG.i686.rpm postgresql-libs-8.2.4-1PGDG.i686.rpm postgresql-plpython-8.2.4-1PGDG.i686.rpm postgresql-server-8.2.4-1PGDG.i686.rpm
To install
rpm -Uhv postgresql*.rpm
Postgres Config
Install new configuration and change the password
psql template1 < /var/lib/pgsql_old/postgresql_backup_file
The above will restore the databases
