Skip to content

Commit eb410b6

Browse files
committed
Manual page improvements.
1 parent 08147fa commit eb410b6

File tree

2 files changed

+22
-19
lines changed

2 files changed

+22
-19
lines changed

contrib/pg_upgrade/pg_upgrade

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# pg_upgrade: update a database without needing a full dump/reload cycle.
44
# CAUTION: Read the manual page before trying to use this!
55

6-
# $Header: /cvsroot/pgsql/contrib/pg_upgrade/Attic/pg_upgrade,v 1.8 2002/01/15 05:10:57 momjian Exp $
6+
# $Header: /cvsroot/pgsql/contrib/pg_upgrade/Attic/pg_upgrade,v 1.9 2002/01/15 05:41:55 momjian Exp $
77
#
88
# To migrate this to newer versions of PostgreSQL:
99
# 1) Update the version numbers at the top of the file
@@ -84,11 +84,11 @@ make_dbobjoidmap()
8484
grep -v '^template0$' |
8585
while read DB
8686
do
87-
QUERY="`echo \" SELECT relname, oid
88-
FROM pg_class
89-
WHERE relkind = 'r' OR
90-
relkind = 'i' OR
91-
relkind = 't'\"`"
87+
QUERY="SELECT relname, oid
88+
FROM pg_class
89+
WHERE relkind = 'r' OR
90+
relkind = 'i' OR
91+
relkind = 't'"
9292
# Don't move over 7.1 int4 sequences; use setval() file.
9393
# Sequence XIDs changed from 7.2beta4 to beta5; don't copy them.
9494
if [ "$SRC_VERSION" != "7.1" -a \

contrib/pg_upgrade/pg_upgrade.1

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,38 +11,40 @@ version.
1111
.LP
1212
\fBpg_upgrade\fP must be run in two stages. In phase one you must run
1313
\fBpg_upgrade\fP with your old database installation in place. In phase two,
14-
\fBpg_upgrade\fP must be run on a freshly \fBinitdb\fP'ed current install.
15-
In both phases, the same \fBpg_upgrade\fP script matching the newly installed
16-
version must be used.
14+
\fBpg_upgrade\fP must be run on a freshly \fBinitdb\fP'ed server.
15+
In both phases, the same newly installed \fBpg_upgrade\fP script must be
16+
used.
1717
.SH Upgrading PostgreSQL with pg_upgrade
1818
.LP
19-
1) Back up your existing data directory, preferably by making a complete
20-
dump with \fBpg_dumpall.\fP
19+
1) Back up your existing data directory, preferably using \fBpg_dumpall.\fP
2120
.LP
2221
2) Copy the program \fIpgsql/contrib/pg_upgrade/pg_upgrade\fP from the current
2322
PostgreSQL distribution somewhere into your path.
2423
.LP
25-
3) Change your working directory to the pgsql main directory, and type:
24+
3) Run phase one of \fBpg_upgrade:\fP
2625
.LP
2726
.B $ pg_upgrade -1
2827
.sp
2928
to collect information about the old database needed for the upgrade.
30-
You may use \fI-D\fP to specify the data directory, or use PGDATA.
29+
You may use \fI-D\fP to specify the data directory. By default it uses
30+
the environment variable \fIPGDATA.\fP
3131
.LP
3232
4) Do:
3333
.LP
34+
.B $ cd pgsql/src
35+
.br
3436
.B $ make install
3537
.sp
36-
to install the new binaries.
38+
to install the PostgreSQL binaries for the new release.
3739
.LP
3840
5) Do:
3941
.LP
4042
.B $ cd pgsql/contrib/pg_resetxlog
4143
.br
4244
.B $ make install
4345
.sp
44-
to install the \fIpg_resetxlog\fP utility which is needed by
45-
\fBpg_upgrade\fP.
46+
to install the \fIpg_resetxlog\fP utility, which is needed during phase
47+
2 of \fBpg_upgrade\fP.
4648
.LP
4749
6) Run initdb to create a new template1 database containing the system
4850
tables for the new release. Make sure you use settings similar to those
@@ -52,17 +54,18 @@ used in your previous version.
5254
to the server until the upgrade is complete. You may wish to start the
5355
postmaster without -i or alter pg_hba.conf temporarily.)
5456
.LP
55-
8) Change your working directory to the pgsql main directory again, and type:
57+
8) Run phase two of \fBpg_upgrade:\fP
5658
.LP
5759
.B $ pg_upgrade -2
5860
.sp
5961
The program will do some checking to make sure everything is properly
60-
configured, and will then recreate all the databases and tables you had,
62+
configured, and will then recreate all your databases and tables,
6163
but with no data. It will then physically move the data files
6264
containing non-system tables and indexes into the proper
6365
subdirectories.
6466
.LP
65-
9) Restore your old \fIpg_hba.conf\fP if needed to allow user logins.
67+
9) Restore your old \fIpostmaster\fP flags or \fIpg_hba.conf\fP if
68+
needed to allow user logins.
6669
.sp
6770
.LP
6871
10) Carefully examine the contents of the upgraded databases. If you

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