From 5b2ebe95e944f9d93b030e513eaa24127c9abab2 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Sun, 13 Jan 2002 01:13:59 +0000 Subject: Wow, it actually worked for the regression database. More testing needed. --- doc/src/sgml/ref/pg_upgrade.sgml | 56 ++++++++++++++-------------------------- 1 file changed, 20 insertions(+), 36 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/ref/pg_upgrade.sgml b/doc/src/sgml/ref/pg_upgrade.sgml index 1e3681984c7..17e36158f15 100644 --- a/doc/src/sgml/ref/pg_upgrade.sgml +++ b/doc/src/sgml/ref/pg_upgrade.sgml @@ -1,5 +1,5 @@ @@ -23,9 +23,10 @@ PostgreSQL documentation 1999-07-31 - -pg_upgrade -s filename old_data_dir - + + pg_upgrade + -1-2 + @@ -56,31 +57,20 @@ pg_upgrade -s filename - Then do: - -$ pg_dumpall -s > schema.out - - to dump out your old database's table definitions without any data. - - - - - - VACUUM your entire database using - vacuumdb -a + Copy the program pgsql/src/bin/pg_dump/pg_upgrade + from the current PostgreSQL distribution into somewhere in your path. - Stop the old postmaster and all backends. - - - - - - Rename (using mv) your old pgsql data/ directory to - data.old/. + Change your working directory to the + pgsql main directory, and type: + +$ pg_upgrade -1 + + to collect information about the old database needed for the + upgrade. @@ -109,14 +99,15 @@ $ make install Run initdb to create a new template1 database - containing the system tables for the new release. + containing the system tables for the new release. Make sure you use + settings similar to those used in your previous version. Start the new postmaster. (Note: it is critical that no users connect - to the database until the upgrade is complete. You may wish to start + to the server until the upgrade is complete. You may wish to start the postmaster without -i and/or alter pg_hba.conf temporarily.) @@ -127,7 +118,7 @@ $ make install Change your working directory to the pgsql main directory, and type: -$ pg_upgrade -s schema.out data.old +$ pg_upgrade -2 The program will do some checking to make sure everything is properly configured, and will run your db.out script to recreate all the databases @@ -149,7 +140,7 @@ $ pg_upgrade -s schema.out data.old Carefully examine the contents of the upgraded - database. If you detect problems, you'll need to recover by restoring + databases. If you detect problems, you'll need to recover by restoring from your full pg_dump backup. You can delete the data.old/ directory when you are satisfied. @@ -158,18 +149,11 @@ $ pg_upgrade -s schema.out data.old - The upgraded database will be in an un-vacuumed state. You will probably + The upgraded databases will be in an un-vacuumed state. You will probably want to run a VACUUM ANALYZE before beginning production work. - - - - pg_upgrade does not handle custom tables/indexes/sequences in template1. - It does handle other template1 object customizations. - - -- cgit v1.2.3