summaryrefslogtreecommitdiff
path: root/doc/src/sgml/ref/pg_upgrade.sgml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/src/sgml/ref/pg_upgrade.sgml')
-rw-r--r--doc/src/sgml/ref/pg_upgrade.sgml181
1 files changed, 125 insertions, 56 deletions
diff --git a/doc/src/sgml/ref/pg_upgrade.sgml b/doc/src/sgml/ref/pg_upgrade.sgml
index 7ee84fa0d3..46ad32c7a9 100644
--- a/doc/src/sgml/ref/pg_upgrade.sgml
+++ b/doc/src/sgml/ref/pg_upgrade.sgml
@@ -1,59 +1,128 @@
-<REFENTRY ID="APP-PG-UPGRADE">
-<REFMETA>
-<REFENTRYTITLE>
-<application>pg_upgrade</application>
-</REFENTRYTITLE>
-<REFMISCINFO>Application</REFMISCINFO>
-</REFMETA>
-<REFNAMEDIV>
-<REFNAME>
-<application>pg_upgrade</application>
-</REFNAME>
-<REFPURPOSE>
-Allows upgrade from a previous release without reloading data
-</REFPURPOSE>
-<REFSYNOPSISDIV>
-<REFSYNOPSISDIVINFO>
-<DATE>1998-10-04</DATE>
-</REFSYNOPSISDIVINFO>
-<SYNOPSIS>
+<refentry id="APP-PG-UPGRADE">
+ <refmeta>
+ <refentrytitle>
+ <application>pg_upgrade</application>
+ </refentrytitle>
+ <refmiscinfo>Application</refmiscinfo>
+ </refmeta>
+ <refnamediv>
+ <refname>
+ <application>pg_upgrade</application>
+ </refname>
+ <refpurpose>
+ Allows upgrade from a previous release without reloading data
+ </refpurpose>
+ <refsynopsisdiv>
+ <refsynopsisdivinfo>
+ <date>1998-10-04</date>
+ </refsynopsisdivinfo>
+ <synopsis>
pg_upgrade
-pg_upgrade [-f <replaceable class="parameter">input_file</replaceable>] <replaceable class="parameter">old_data_dir</replaceable>
-</SYNOPSIS>
-
-<REFSECT1 ID="R1-APP-PG-UPGRADE-1">
-<REFSECT1INFO>
-<DATE>1998-10-04</DATE>
-</REFSECT1INFO>
-<TITLE>
-Description
-</TITLE>
-<PARA>
-<application>pg_upgrade</application>
- 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:
-<programlisting>
+pg_upgrade [ -f <replaceable class="parameter">filename</replaceable> ] <replaceable class="parameter">old_data_dir</replaceable>
+ </synopsis>
+ </refsynopsisdiv>
+
+ <refsect1 id="R1-APP-PG-UPGRADE-1">
+ <refsect1info>
+ <date>1998-10-04</date>
+ </refsect1info>
+ <title>
+ Description
+ </title>
+ <para>
+ <application>pg_upgrade</application>
+ is a utility for upgrading from a previous
+ PostgreSQL release without reloading all the data.
+
+ <procedure>
+ <title>Upgrading <productname>Postgres</productname></title>
+
+ <step performance="required">
+ <para>
+ Back up your data directory.
+ </para>
+ </step>
+
+ <step performance="required">
+ <para>
+ Use:
+ <programlisting>
% pg_dumpall -s >db.out
-</programlisting>
-to dump out your old database definitions without any
-data. Stop the postmaster and all backends.
-</para>
-
-<para>
-Then rename (using mv) your old pgsql /data directory to
-/data.old and 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, cd to the
-pgsql main directory, and type:
-<programlisting>
+ </programlisting>
+ to dump out your old database definitions without any
+ data. Stop the 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>.
+ </para>
+ </step>
+
+ <step performance="required">
+ <para>
+ Do a
+ <command>make install</command> to install the new binaries.
+ </para>
+ </step>
+
+ <step performance="required">
+ <para>
+ Run <application>initdb</application> to create a new template1 database containing the system
+ tables for the new release.
+ </para>
+ </step>
+
+ <step performance="required">
+ <para>
+ Start the new postmaster.
+ </para>
+ </step>
+
+ <step performance="required">
+ <para>
+ Change your working directory to the
+ pgsql main directory, and type:
+ <programlisting>
% pg_upgrade -f db.out data.old
-</programlisting>
-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.old
-into the proper /data directory. You can then check out
-the data. You can delete the /data.old directory when you
-are finished.
-</REFENTRY>
+ </programlisting>
+ 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 <filename>data.old/</filename>
+ into the proper <filename>data/</filename> directory.
+ </para>
+ </step>
+
+ <step performance="required">
+ <para>
+ <emphasis>Carefully</emphasis> examine the contents of the upgraded database.
+ </para>
+ </step>
+
+ <step performance="required">
+ <para>
+ You can delete the <filename>data.old/</filename> directory when you
+ are finished.
+ </para>
+ </refsect1>
+</refentry>
+
+<!-- Keep this comment at the end of the file
+Local variables:
+mode: sgml
+sgml-omittag:nil
+sgml-shorttag:t
+sgml-minimize-attributes:nil
+sgml-always-quote-attributes:t
+sgml-indent-step:1
+sgml-indent-data:t
+sgml-parent-document:nil
+sgml-default-dtd-file:"../reference.ced"
+sgml-exposed-tags:nil
+sgml-local-catalogs:"/usr/lib/sgml/catalog"
+sgml-local-ecat-files:nil
+End:
+-->