pg_upgrade(UNIX)

NAME
pg_upgrade - allows upgrade from a previous release without reloading data

SYNOPSIS
pg_upgrade [-f input_file] database

DESCRIPTION
pg_upgrade is a utility for upgrading from a previous PostgreSQL release without reloading all the data. First, to be safe, back up your data directory. Then, use:
	pg_dumpall -s -o >db.out
to dump out your old database definitions without data, while perserving the max system oid.

Then rename (using mv) your old pgsql /data directory to /data.upgrade and do a make install to install the new binaries. Then run initdb to create a new template1 database containing the system tables for the new release. cd to the pgsql main directory, and type:
	pg_upgrade -f db.out template1
The system will do some checking to make sure everything is properly configured, and run your db.out script to create all the databases and tables you had, but with no data. It will then move the data files from /data.upgrade into the proper /data directory. You can then start the postmaster and check out the data. You can delete the /data.upgrade directory when you are finished.

SEE ALSO
pg_dumpall(1).