Skip to content

Commit d7f2c55

Browse files
committed
Add some more verbiage to man page's directions for pg_upgrade.
1 parent cf835f9 commit d7f2c55

File tree

1 file changed

+48
-23
lines changed

1 file changed

+48
-23
lines changed

doc/src/sgml/ref/pg_upgrade.sgml

Lines changed: 48 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/ref/Attic/pg_upgrade.sgml,v 1.5 1999/07/22 15:09:13 thomas Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/ref/Attic/pg_upgrade.sgml,v 1.6 1999/07/31 22:05:48 tgl Exp $
33
Postgres documentation
44
-->
55

@@ -20,17 +20,16 @@ Postgres documentation
2020
</refnamediv>
2121
<refsynopsisdiv>
2222
<refsynopsisdivinfo>
23-
<date>1999-07-20</date>
23+
<date>1999-07-31</date>
2424
</refsynopsisdivinfo>
2525
<synopsis>
26-
pg_upgrade
2726
pg_upgrade [ -f <replaceable class="parameter">filename</replaceable> ] <replaceable class="parameter">old_data_dir</replaceable>
2827
</synopsis>
2928
</refsynopsisdiv>
3029

3130
<refsect1 id="R1-APP-PG-UPGRADE-1">
3231
<refsect1info>
33-
<date>1998-10-04</date>
32+
<date>1999-07-31</date>
3433
</refsect1info>
3534
<title>
3635
Description
@@ -40,54 +39,66 @@ pg_upgrade [ -f <replaceable class="parameter">filename</replaceable> ] <replace
4039
<application>pg_upgrade</application>
4140
is a utility for upgrading from a previous
4241
PostgreSQL release without reloading all the data.
43-
Not all <productname>Postgres</productname> releases can be handled
44-
this way; check the release notes for details on your installation.
42+
Not all <productname>Postgres</productname> release transitions can be
43+
handled this way; check the release notes for details on your installation.
4544
</para>
4645

4746
<procedure>
48-
<title>Upgrading <productname>Postgres</productname></title>
47+
<title>Upgrading <productname>Postgres</productname> with pg_upgrade</title>
4948

5049
<step performance="required">
5150
<para>
52-
Back up your data directory.
51+
Back up your existing data directory, preferably by making a
52+
complete dump with pg_dumpall.
5353
</para>
5454
</step>
5555

5656
<step performance="required">
5757
<para>
58-
Use:
58+
Do
5959
<programlisting>
6060
% pg_dumpall -s >db.out
6161
</programlisting>
62-
to dump out your old database definitions without any
63-
data. Stop the postmaster and all backends.
62+
to dump out your old database's table definitions without any data.
6463
</para>
6564
</step>
6665

6766
<step performance="required">
6867
<para>
69-
Rename (using mv) your old pgsql <filename>data/</filename> directory to
68+
Stop the old postmaster and all backends.
69+
</para>
70+
</step>
71+
72+
<step performance="required">
73+
<para>
74+
Rename (using mv) your old pgsql <filename>data/</filename> directory to
7075
<filename>data.old/</filename>.
7176
</para>
7277
</step>
7378

7479
<step performance="required">
7580
<para>
76-
Do a
77-
<command>make install</command> to install the new binaries.
81+
Do
82+
<programlisting>
83+
% make install
84+
</programlisting>
85+
to install the new binaries.
7886
</para>
7987
</step>
8088

8189
<step performance="required">
8290
<para>
83-
Run <application>initdb</application> to create a new template1 database containing the system
84-
tables for the new release.
91+
Run <application>initdb</application> to create a new template1 database
92+
containing the system tables for the new release.
8593
</para>
8694
</step>
8795

8896
<step performance="required">
8997
<para>
90-
Start the new postmaster.
98+
Start the new postmaster. (Note: it is critical that no users connect
99+
to the database until the upgrade is complete. You may wish to start
100+
the postmaster without -i and/or alter <filename>pg_hba.conf</filename>
101+
temporarily.)
91102
</para>
92103
</step>
93104

@@ -98,22 +109,36 @@ pg_upgrade [ -f <replaceable class="parameter">filename</replaceable> ] <replace
98109
<programlisting>
99110
% pg_upgrade -f db.out data.old
100111
</programlisting>
101-
The system will do some checking to make sure everything
102-
is properly configured, and will run your db.out script to create
103-
all the databases and tables you had, but with no
104-
data. It will then move the data files from <filename>data.old/</filename>
105-
into the proper <filename>data/</filename> directory.
112+
The program will do some checking to make sure everything is properly
113+
configured, and will run your db.out script to recreate all the databases
114+
and tables you had, but with no data. It will then physically move the
115+
data files containing non-system tables and indexes from
116+
<filename>data.old/</filename> into the proper
117+
<filename>data/</filename> subdirectories, replacing the empty data files
118+
created during the db.out script.
119+
</para>
120+
</step>
121+
122+
<step performance="required">
123+
<para>
124+
<emphasis>Carefully</emphasis> examine the contents of the upgraded
125+
database. If you detect problems, you'll need to recover by restoring
126+
from your full pg_dump backup.
106127
</para>
107128
</step>
108129

109130
<step performance="required">
110131
<para>
111-
<emphasis>Carefully</emphasis> examine the contents of the upgraded database.
132+
The upgraded database will be in an un-vacuumed state. You will probably
133+
want to run a <command>VACUUM ANALYZE</command> before beginning
134+
production work.
112135
</para>
113136
</step>
114137

115138
<step performance="required">
116139
<para>
140+
Restart the postmaster and/or restore your old
141+
<filename>pg_hba.conf</filename> if needed to allow user logins.
117142
You can delete the <filename>data.old/</filename> directory when you
118143
are finished.
119144
</para>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy