mirror of
https://github.com/postgres/postgres.git
synced 2025-05-24 00:03:23 -04:00
Add some more verbiage to man page's directions for pg_upgrade.
This commit is contained in:
parent
cf835f97fc
commit
d7f2c5580d
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/Attic/pg_upgrade.sgml,v 1.5 1999/07/22 15:09:13 thomas Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/ref/Attic/pg_upgrade.sgml,v 1.6 1999/07/31 22:05:48 tgl Exp $
|
||||||
Postgres documentation
|
Postgres documentation
|
||||||
-->
|
-->
|
||||||
|
|
||||||
@ -20,17 +20,16 @@ Postgres documentation
|
|||||||
</refnamediv>
|
</refnamediv>
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<refsynopsisdivinfo>
|
<refsynopsisdivinfo>
|
||||||
<date>1999-07-20</date>
|
<date>1999-07-31</date>
|
||||||
</refsynopsisdivinfo>
|
</refsynopsisdivinfo>
|
||||||
<synopsis>
|
<synopsis>
|
||||||
pg_upgrade
|
|
||||||
pg_upgrade [ -f <replaceable class="parameter">filename</replaceable> ] <replaceable class="parameter">old_data_dir</replaceable>
|
pg_upgrade [ -f <replaceable class="parameter">filename</replaceable> ] <replaceable class="parameter">old_data_dir</replaceable>
|
||||||
</synopsis>
|
</synopsis>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1 id="R1-APP-PG-UPGRADE-1">
|
<refsect1 id="R1-APP-PG-UPGRADE-1">
|
||||||
<refsect1info>
|
<refsect1info>
|
||||||
<date>1998-10-04</date>
|
<date>1999-07-31</date>
|
||||||
</refsect1info>
|
</refsect1info>
|
||||||
<title>
|
<title>
|
||||||
Description
|
Description
|
||||||
@ -40,54 +39,66 @@ pg_upgrade [ -f <replaceable class="parameter">filename</replaceable> ] <replace
|
|||||||
<application>pg_upgrade</application>
|
<application>pg_upgrade</application>
|
||||||
is a utility for upgrading from a previous
|
is a utility for upgrading from a previous
|
||||||
PostgreSQL release without reloading all the data.
|
PostgreSQL release without reloading all the data.
|
||||||
Not all <productname>Postgres</productname> releases can be handled
|
Not all <productname>Postgres</productname> release transitions can be
|
||||||
this way; check the release notes for details on your installation.
|
handled this way; check the release notes for details on your installation.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<procedure>
|
<procedure>
|
||||||
<title>Upgrading <productname>Postgres</productname></title>
|
<title>Upgrading <productname>Postgres</productname> with pg_upgrade</title>
|
||||||
|
|
||||||
<step performance="required">
|
<step performance="required">
|
||||||
<para>
|
<para>
|
||||||
Back up your data directory.
|
Back up your existing data directory, preferably by making a
|
||||||
|
complete dump with pg_dumpall.
|
||||||
</para>
|
</para>
|
||||||
</step>
|
</step>
|
||||||
|
|
||||||
<step performance="required">
|
<step performance="required">
|
||||||
<para>
|
<para>
|
||||||
Use:
|
Do
|
||||||
<programlisting>
|
<programlisting>
|
||||||
% pg_dumpall -s >db.out
|
% pg_dumpall -s >db.out
|
||||||
</programlisting>
|
</programlisting>
|
||||||
to dump out your old database definitions without any
|
to dump out your old database's table definitions without any data.
|
||||||
data. Stop the postmaster and all backends.
|
|
||||||
</para>
|
</para>
|
||||||
</step>
|
</step>
|
||||||
|
|
||||||
<step performance="required">
|
<step performance="required">
|
||||||
<para>
|
<para>
|
||||||
Rename (using mv) your old pgsql <filename>data/</filename> directory to
|
Stop the old postmaster and all backends.
|
||||||
|
</para>
|
||||||
|
</step>
|
||||||
|
|
||||||
|
<step performance="required">
|
||||||
|
<para>
|
||||||
|
Rename (using mv) your old pgsql <filename>data/</filename> directory to
|
||||||
<filename>data.old/</filename>.
|
<filename>data.old/</filename>.
|
||||||
</para>
|
</para>
|
||||||
</step>
|
</step>
|
||||||
|
|
||||||
<step performance="required">
|
<step performance="required">
|
||||||
<para>
|
<para>
|
||||||
Do a
|
Do
|
||||||
<command>make install</command> to install the new binaries.
|
<programlisting>
|
||||||
|
% make install
|
||||||
|
</programlisting>
|
||||||
|
to install the new binaries.
|
||||||
</para>
|
</para>
|
||||||
</step>
|
</step>
|
||||||
|
|
||||||
<step performance="required">
|
<step performance="required">
|
||||||
<para>
|
<para>
|
||||||
Run <application>initdb</application> to create a new template1 database containing the system
|
Run <application>initdb</application> to create a new template1 database
|
||||||
tables for the new release.
|
containing the system tables for the new release.
|
||||||
</para>
|
</para>
|
||||||
</step>
|
</step>
|
||||||
|
|
||||||
<step performance="required">
|
<step performance="required">
|
||||||
<para>
|
<para>
|
||||||
Start the new postmaster.
|
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
|
||||||
|
the postmaster without -i and/or alter <filename>pg_hba.conf</filename>
|
||||||
|
temporarily.)
|
||||||
</para>
|
</para>
|
||||||
</step>
|
</step>
|
||||||
|
|
||||||
@ -98,22 +109,36 @@ pg_upgrade [ -f <replaceable class="parameter">filename</replaceable> ] <replace
|
|||||||
<programlisting>
|
<programlisting>
|
||||||
% pg_upgrade -f db.out data.old
|
% pg_upgrade -f db.out data.old
|
||||||
</programlisting>
|
</programlisting>
|
||||||
The system will do some checking to make sure everything
|
The program will do some checking to make sure everything is properly
|
||||||
is properly configured, and will run your db.out script to create
|
configured, and will run your db.out script to recreate all the databases
|
||||||
all the databases and tables you had, but with no
|
and tables you had, but with no data. It will then physically move the
|
||||||
data. It will then move the data files from <filename>data.old/</filename>
|
data files containing non-system tables and indexes from
|
||||||
into the proper <filename>data/</filename> directory.
|
<filename>data.old/</filename> into the proper
|
||||||
|
<filename>data/</filename> subdirectories, replacing the empty data files
|
||||||
|
created during the db.out script.
|
||||||
</para>
|
</para>
|
||||||
</step>
|
</step>
|
||||||
|
|
||||||
<step performance="required">
|
<step performance="required">
|
||||||
<para>
|
<para>
|
||||||
<emphasis>Carefully</emphasis> examine the contents of the upgraded database.
|
<emphasis>Carefully</emphasis> examine the contents of the upgraded
|
||||||
|
database. If you detect problems, you'll need to recover by restoring
|
||||||
|
from your full pg_dump backup.
|
||||||
</para>
|
</para>
|
||||||
</step>
|
</step>
|
||||||
|
|
||||||
<step performance="required">
|
<step performance="required">
|
||||||
<para>
|
<para>
|
||||||
|
The upgraded database will be in an un-vacuumed state. You will probably
|
||||||
|
want to run a <command>VACUUM ANALYZE</command> before beginning
|
||||||
|
production work.
|
||||||
|
</para>
|
||||||
|
</step>
|
||||||
|
|
||||||
|
<step performance="required">
|
||||||
|
<para>
|
||||||
|
Restart the postmaster and/or restore your old
|
||||||
|
<filename>pg_hba.conf</filename> if needed to allow user logins.
|
||||||
You can delete the <filename>data.old/</filename> directory when you
|
You can delete the <filename>data.old/</filename> directory when you
|
||||||
are finished.
|
are finished.
|
||||||
</para>
|
</para>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user