Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit15ca0a5

Browse files
committed
Add manual page to /contrib. SGML from docs.
1 parent92a8bc9 commit15ca0a5

File tree

1 file changed

+75
-0
lines changed

1 file changed

+75
-0
lines changed

‎contrib/pg_upgrade/pg_upgrade.man

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
.TH PG_UPGRADE 1 "PG_UPGRADE(1)" "14 Jan 2002" "PostgreSQL Client Applications" ""
2+
.SH NAME
3+
pg_upgrade\- upgrade tool
4+
.SH SYNOPSIS
5+
Allows upgrading from a previous release without reloading data
6+
.SH DESCRIPTION
7+
pg_upgrade is a utility for upgrading from a previous PostgreSQL release
8+
without reloading all the data. Not all PostgreSQL releases can be
9+
handled this way. Check the release notes for details about your
10+
version.
11+
.LP
12+
pg_upgrade must be run in two stages. In phase one you must run
13+
pg_upgrade with your old database installation in place. In phase two,
14+
pg_upgrade must be run on a freshly initdb'ed current install.
15+
In both phases, the same pg_upgrade script matching the newly installed
16+
version must be used.
17+
.SH Upgrading PostgreSQL with pg_upgrade
18+
.LP
19+
1) Back up your existing data directory, preferably by making a complete
20+
dump with pg_dumpall.
21+
.LP
22+
2) Copy the program pgsql/contrib/pg_upgrade/pg_upgrade from the current
23+
PostgreSQL distribution into somewhere in your path.
24+
.LP
25+
3) Change your working directory to the pgsql main directory, and type:
26+
.LP
27+
.B$pg_upgrade-1
28+
.sp
29+
to collect information about the old database needed for the upgrade.
30+
.LP
31+
4) Do:
32+
.LP
33+
.B$makeinstall
34+
.sp
35+
to install the new binaries.
36+
.LP
37+
5) Do:
38+
.LP
39+
.B$cdpgsql/contrib/pg_resetxlog
40+
.br
41+
.B$makeinstall
42+
.sp
43+
to install the pg_resetxlog utility which is needed by
44+
pg_upgrade.
45+
.LP
46+
6) Run initdb to create a new template1 database containing the system
47+
tables for the new release. Make sure you use settings similar to those
48+
used in your previous version.
49+
.LP
50+
7) Start the new postmaster. (Note: it is critical that no users connect
51+
to the server until the upgrade is complete. You may wish to start the
52+
postmaster without -i and/or alter pg_hba.conf temporarily.)
53+
.LP
54+
8) Change your working directory to the pgsql main directory, and type:
55+
.LP
56+
.B$pg_upgrade-2
57+
.sp
58+
The program will do some checking to make sure everything is properly
59+
configured, and will then recreate all the databases and tables you had,
60+
but with no data. It will then physically move the data files
61+
containing non-system tables and indexes into the proper
62+
subdirectories.
63+
.LP
64+
9) Restore your old pg_hba.conf if needed to allow user logins.
65+
.sp
66+
.LP
67+
10) Carefully examine the contents of the upgraded databases. If you
68+
detect problems, you'll need to recover by restoring from your full
69+
pg_dump backup. You can delete the pg_upgrade_info/ directory when you
70+
are satisfied.
71+
.LP
72+
The upgraded databases will be in an un-vacuumed state. You will
73+
probably want to run a VACUUM ANALYZE before beginning production work.
74+
.SH SEE ALSO
75+
initdb(1), postmaster(1), pg_dump(1), pg_dumpall(1), vacuumdb(1)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp