--- /dev/null
+
+
+
+PG_UPGRADE(1) PostgreSQL Client Applications PG_UPGRADE(1)
+
+
+N\bNA\bAM\bME\bE
+ pg_upgrade - upgrade tool
+
+S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
+ Allows upgrading from a previous release without reloading
+ data
+
+D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
+ pg_upgrade is a utility for upgrading from a previous
+ PostgreSQL release without reloading all the data. Not all
+ PostgreSQL releases can be handled this way. Check the
+ release notes for details about your version.
+
+ pg_upgrade must be run in two stages. In phase one you
+ must run pg_upgrade with your old database installation in
+ place. In phase two, pg_upgrade must be run on a freshly
+ initdb'ed current install. In both phases, the same
+ pg_upgrade script matching the newly installed version
+ must be used.
+
+U\bUp\bpg\bgr\bra\bad\bdi\bin\bng\bg P\bPo\bos\bst\btg\bgr\bre\beS\bSQ\bQL\bL w\bwi\bit\bth\bh p\bpg\bg_\b_u\bup\bpg\bgr\bra\bad\bde\be
+ 1) Back up your existing data directory, preferably by
+ making a complete dump with pg_dumpall.
+
+ 2) Copy the program _\bp_\bg_\bs_\bq_\bl_\b/_\bc_\bo_\bn_\bt_\br_\bi_\bb_\b/_\bp_\bg_\b__\bu_\bp_\bg_\br_\ba_\bd_\be_\b/_\bp_\bg_\b__\bu_\bp_\bg_\br_\ba_\bd_\be
+ from the current PostgreSQL distribution somewhere into
+ your path.
+
+ 3) Change your working directory to the pgsql main direc-
+ tory, and type:
+
+ $\b$ p\bpg\bg_\b_u\bup\bpg\bgr\bra\bad\bde\be -\b-1\b1
+
+ to collect information about the old database needed for
+ the upgrade.
+
+ 4) Do:
+
+ $\b$ m\bma\bak\bke\be i\bin\bns\bst\bta\bal\bll\bl
+
+ to install the new binaries.
+
+ 5) Do:
+
+ $\b$ c\bcd\bd p\bpg\bgs\bsq\bql\bl/\b/c\bco\bon\bnt\btr\bri\bib\bb/\b/p\bpg\bg_\b_r\bre\bes\bse\bet\btx\bxl\blo\bog\bg
+ $\b$ m\bma\bak\bke\be i\bin\bns\bst\bta\bal\bll\bl
+
+ to install the _\bp_\bg_\b__\br_\be_\bs_\be_\bt_\bx_\bl_\bo_\bg utility which is needed by
+ pg_upgrade.
+
+ 6) Run initdb to create a new template1 database contain-
+ ing the system tables for the new release. Make sure you
+ use settings similar to those used in your previous ver-
+ sion.
+
+
+
+14 Jan 2002 PG_UPGRADE(1) 1
+
+
+
+
+
+PG_UPGRADE(1) PostgreSQL Client Applications PG_UPGRADE(1)
+
+
+ 7) Start the new _\bp_\bo_\bs_\bt_\bm_\ba_\bs_\bt_\be_\br_\b. (Note: it is critical that
+ no users connect to the server until the upgrade is com-
+ plete. You may wish to start the postmaster without -i or
+ alter pg_hba.conf temporarily.)
+
+ 8) Change your working directory to the pgsql main direc-
+ tory, and type:
+
+ $\b$ p\bpg\bg_\b_u\bup\bpg\bgr\bra\bad\bde\be -\b-2\b2
+
+ The program will do some checking to make sure everything
+ is properly configured, and will then recreate all the
+ databases and tables you had, but with no data. It will
+ then physically move the data files containing non-system
+ tables and indexes into the proper subdirectories.
+
+ 9) Restore your old _\bp_\bg_\b__\bh_\bb_\ba_\b._\bc_\bo_\bn_\bf if needed to allow user
+ logins.
+
+
+ 10) Carefully examine the contents of the upgraded
+ databases. If you detect problems, you'll need to recover
+ by restoring from your full pg_dump backup. You can delete
+ the _\bp_\bg_\b__\bu_\bp_\bg_\br_\ba_\bd_\be_\b__\bi_\bn_\bf_\bo_\b/ directory when you are satisfied.
+
+ The upgraded databases will be in an un-vacuumed state.
+ You will probably want to run a _\bV_\bA_\bC_\bU_\bU_\bM _\bA_\bN_\bA_\bL_\bY_\bZ_\bE b\bbe\bef\bfo\bor\bre\be
+ b\bbe\beg\bgi\bin\bnn\bni\bin\bng\bg p\bpr\bro\bod\bdu\buc\bct\bti\bio\bon\bn w\bwo\bor\brk\bk.\b.
+
+S\bSE\bEE\bE A\bAL\bLS\bSO\bO
+ initdb(1), postmaster(1), pg_dump(1), pg_dumpall(1), vacu-
+ umdb(1)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+14 Jan 2002 PG_UPGRADE(1) 2
+
+