pg_upgrade Application pg_upgrade Allows upgrade from a previous release without reloading data 1998-10-04 pg_upgrade pg_upgrade [ -f filename ] old_data_dir 1998-10-04 Description pg_upgrade is a utility for upgrading from a previous PostgreSQL release without reloading all the data. Upgrading <productname>Postgres</productname> Back up your data directory. Use: % pg_dumpall -s >db.out to dump out your old database definitions without any data. Stop the postmaster and all backends. Rename (using mv) your old pgsql data/ directory to data.old/. Do a make install to install the new binaries. Run initdb to create a new template1 database containing the system tables for the new release. Start the new postmaster. Change your working directory to the pgsql main directory, and type: % pg_upgrade -f db.out data.old The system will do some checking to make sure everything is properly configured, and will 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.old/ into the proper data/ directory. Carefully examine the contents of the upgraded database. You can delete the data.old/ directory when you are finished.