Upgrading PostgreSQL from 8.3 to 8.4
Posted in IT, Linux, Software on May 22nd, 2011 by SlimDudeSteps to Upgrade PostgreSQL in Ubuntu:
- Stop cron and other applications that using PostgreSQL.
# /etc/init.d/cron stop
# /etc/init.d/apache2 stop
# /etc/init.d/jabberd2 stop
# /etc/init.d/tinyerp-server stop - Backup
$ sudo su
# su postgres
$ pg_dumpall > /var/lib/postgresql/all.sql
$ exit - Install the latest PostgreSQL version
..
# apt-get install postgresql-8.4
Configuring postgresql.conf to use port 5433…Installer will detect the previous version, if exist than the new one will use port 5433. - Restore to new version
# su postgres
$ /usr/lib/postgresql/8.4/bin/psql template1 -f /var/lib/postgresql/all.sql -p 5433
$ exit - Remove the previous version
# apt-get remove postgresql-8.3
# apt-get remove postgresql-client-8.3 - Change port 5433 to 5432 in /etc/postgresql/8.4/main/postgresql.conf:
Don’t forget to set other configuration, such:
port = 5432
and access rules in /etc/postgresql/8.4/main/pg_hba.conf.
listen_addresses = '*' - Restart your postgreSQL
# /etc/init.d/postgresql-8.4 restart - Activate cron and other applications, make sure everything is OK.
# /etc/init.d/cron start
# /etc/init.d/apache2 start
# /etc/init.d/jabberd2 start
# /etc/init.d/tinyerp-server start