1
1
<!--
2
- $Header: /cvsroot/pgsql/doc/src/sgml/ref/Attic/pg_upgrade.sgml,v 1.19 2002/01/11 20:48:47 momjian Exp $
2
+ $Header: /cvsroot/pgsql/doc/src/sgml/ref/Attic/pg_upgrade.sgml,v 1.20 2002/01/13 01:13:59 momjian Exp $
3
3
PostgreSQL documentation
4
4
-->
5
5
@@ -23,9 +23,10 @@ PostgreSQL documentation
23
23
<refsynopsisdivinfo>
24
24
<date>1999-07-31</date>
25
25
</refsynopsisdivinfo>
26
- <synopsis>
27
- pg_upgrade -s <replaceable class="parameter">filename</replaceable> <replaceable class="parameter">old_data_dir</replaceable>
28
- </synopsis>
26
+ <cmdsynopsis>
27
+ <command>pg_upgrade</command>
28
+ <group choice="plain"><arg>-1</arg><arg>-2</arg></group>
29
+ </cmdsynopsis>
29
30
</refsynopsisdiv>
30
31
31
32
<refsect1 id="R1-APP-PG-UPGRADE-1">
@@ -56,31 +57,20 @@ pg_upgrade -s <replaceable class="parameter">filename</replaceable> <replaceable
56
57
57
58
<step performance="required">
58
59
<para>
59
- Then do:
60
- <programlisting>
61
- $ pg_dumpall -s > schema.out
62
- </programlisting>
63
- to dump out your old database's table definitions without any data.
64
- </para>
65
- </step>
66
-
67
- <step performance="required">
68
- <para>
69
- <command>VACUUM</command> your entire database using
70
- <command>vacuumdb -a</command.>
60
+ Copy the program <filename>pgsql/src/bin/pg_dump/pg_upgrade</filename>
61
+ from the current PostgreSQL distribution into somewhere in your path.
71
62
</para>
72
63
</step>
73
64
74
65
<step performance="required">
75
66
<para>
76
- Stop the old postmaster and all backends.
77
- </para>
78
- </step>
79
-
80
- <step performance="required">
81
- <para>
82
- Rename (using mv) your old pgsql <filename>data/</filename> directory to
83
- <filename>data.old/</filename>.
67
+ Change your working directory to the
68
+ pgsql main directory, and type:
69
+ <programlisting>
70
+ $ pg_upgrade -1
71
+ </programlisting>
72
+ to collect information about the old database needed for the
73
+ upgrade.
84
74
</para>
85
75
</step>
86
76
@@ -109,14 +99,15 @@ $ make install
109
99
<step performance="required">
110
100
<para>
111
101
Run <application>initdb</application> to create a new template1 database
112
- containing the system tables for the new release.
102
+ containing the system tables for the new release. Make sure you use
103
+ settings similar to those used in your previous version.
113
104
</para>
114
105
</step>
115
106
116
107
<step performance="required">
117
108
<para>
118
109
Start the new postmaster. (Note: it is critical that no users connect
119
- to the database until the upgrade is complete. You may wish to start
110
+ to the server until the upgrade is complete. You may wish to start
120
111
the postmaster without -i and/or alter <filename>pg_hba.conf</filename>
121
112
temporarily.)
122
113
</para>
@@ -127,7 +118,7 @@ $ make install
127
118
Change your working directory to the
128
119
pgsql main directory, and type:
129
120
<programlisting>
130
- $ pg_upgrade -s schema.out data.old
121
+ $ pg_upgrade -2
131
122
</programlisting>
132
123
The program will do some checking to make sure everything is properly
133
124
configured, and will run your db.out script to recreate all the databases
@@ -149,7 +140,7 @@ $ pg_upgrade -s schema.out data.old
149
140
<step performance="required">
150
141
<para>
151
142
<emphasis>Carefully</emphasis> examine the contents of the upgraded
152
- database . If you detect problems, you'll need to recover by restoring
143
+ databases . If you detect problems, you'll need to recover by restoring
153
144
from your full pg_dump backup.
154
145
You can delete the <filename>data.old/</filename> directory when you
155
146
are satisfied.
@@ -158,18 +149,11 @@ $ pg_upgrade -s schema.out data.old
158
149
159
150
<step performance="required">
160
151
<para>
161
- The upgraded database will be in an un-vacuumed state. You will probably
152
+ The upgraded databases will be in an un-vacuumed state. You will probably
162
153
want to run a <command>VACUUM ANALYZE</command> before beginning
163
154
production work.
164
155
</para>
165
156
</step>
166
-
167
- <note>
168
- <para>
169
- pg_upgrade does not handle custom tables/indexes/sequences in template1.
170
- It does handle other template1 object customizations.
171
- </para>
172
- </note>
173
157
</procedure>
174
158
</refsect1>
175
159
</refentry>
0 commit comments