New features in PostgreSQL 8.4 include: parallel database restore, per-column permissions and new monitoring tools.
A data dump and restore using pg_dump is required for migration from the existing PostgreSQL 8.1 (supplied by the postgres package). Due to this requirement, postgres and postgresql84 contain package level conflicts and only a single version can be installed on a system.
To upgrade PostgreSQL, follow these steps:
- Create a backups directory:
# mkdir /pgbak # chown postgres:postgres /pgbak/
- Dump only global database objects (roles and tablespaces), no databases:
# su - postgres # pg_dumpall --globals-only > /pgbak/globals.sql # pg_dump --create --oids --format=c --verbose --file=/pgbak/dbX dbX # exit
- Stop the database server:
# /etc/init.d/postgresql stop
- Create full backup of database cluster (is not used in upgrading process):
# mv /var/lib/pgsql/data /pgbak
- Upgrade PostgreSQL 8.1.6 to 8.4.2:
# yum remove postgresql* # yum install postgresql84-server
- Initialize new database cluster:
# /etc/init.d/postgresql initdb
- Restore configuration files modifications on /var/lib/pgsql/data/*.conf
- Start the PostgreSQL service:
# chkconfig --level 35 postgresql on # /etc/init.d/postgresql start
- Restore global database objects (roles and tablespaces) and databases:
# su - postgres psql -f /pgbak/globals.sql pg_restore --create -d postgres /pgbak/dbX # exit

8 comments: