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

Commit309cbe4

Browse files
committed
Add README file.
1 parent0451c09 commit309cbe4

File tree

1 file changed

+132
-0
lines changed

1 file changed

+132
-0
lines changed

‎contrib/pg_upgrade/README

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
2+
3+
4+
PG_UPGRADE(1) PostgreSQL Client Applications PG_UPGRADE(1)
5+
6+
7+
NNAAMMEE
8+
pg_upgrade - upgrade tool
9+
10+
SSYYNNOOPPSSIISS
11+
Allows upgrading from a previous release without reloading
12+
data
13+
14+
DDEESSCCRRIIPPTTIIOONN
15+
pg_upgrade is a utility for upgrading from a previous
16+
PostgreSQL release without reloading all the data. Not all
17+
PostgreSQL releases can be handled this way. Check the
18+
release notes for details about your version.
19+
20+
pg_upgrade must be run in two stages. In phase one you
21+
must run pg_upgrade with your old database installation in
22+
place. In phase two, pg_upgrade must be run on a freshly
23+
initdb'ed current install. In both phases, the same
24+
pg_upgrade script matching the newly installed version
25+
must be used.
26+
27+
UUppggrraaddiinngg PPoossttggrreeSSQQLL wwiitthh ppgg__uuppggrraaddee
28+
1) Back up your existing data directory, preferably by
29+
making a complete dump with pg_dumpall.
30+
31+
2) Copy the program _p_g_s_q_l_/_c_o_n_t_r_i_b_/_p_g___u_p_g_r_a_d_e_/_p_g___u_p_g_r_a_d_e
32+
from the current PostgreSQL distribution somewhere into
33+
your path.
34+
35+
3) Change your working directory to the pgsql main direc-
36+
tory, and type:
37+
38+
$$ ppgg__uuppggrraaddee --11
39+
40+
to collect information about the old database needed for
41+
the upgrade.
42+
43+
4) Do:
44+
45+
$$ mmaakkee iinnssttaallll
46+
47+
to install the new binaries.
48+
49+
5) Do:
50+
51+
$$ ccdd ppggssqqll//ccoonnttrriibb//ppgg__rreesseettxxlloogg
52+
$$ mmaakkee iinnssttaallll
53+
54+
to install the _p_g___r_e_s_e_t_x_l_o_g utility which is needed by
55+
pg_upgrade.
56+
57+
6) Run initdb to create a new template1 database contain-
58+
ing the system tables for the new release. Make sure you
59+
use settings similar to those used in your previous ver-
60+
sion.
61+
62+
63+
64+
14 Jan 2002 PG_UPGRADE(1) 1
65+
66+
67+
68+
69+
70+
PG_UPGRADE(1) PostgreSQL Client Applications PG_UPGRADE(1)
71+
72+
73+
7) Start the new _p_o_s_t_m_a_s_t_e_r_. (Note: it is critical that
74+
no users connect to the server until the upgrade is com-
75+
plete. You may wish to start the postmaster without -i or
76+
alter pg_hba.conf temporarily.)
77+
78+
8) Change your working directory to the pgsql main direc-
79+
tory, and type:
80+
81+
$$ ppgg__uuppggrraaddee --22
82+
83+
The program will do some checking to make sure everything
84+
is properly configured, and will then recreate all the
85+
databases and tables you had, but with no data. It will
86+
then physically move the data files containing non-system
87+
tables and indexes into the proper subdirectories.
88+
89+
9) Restore your old _p_g___h_b_a_._c_o_n_f if needed to allow user
90+
logins.
91+
92+
93+
10) Carefully examine the contents of the upgraded
94+
databases. If you detect problems, you'll need to recover
95+
by restoring from your full pg_dump backup. You can delete
96+
the _p_g___u_p_g_r_a_d_e___i_n_f_o_/ directory when you are satisfied.
97+
98+
The upgraded databases will be in an un-vacuumed state.
99+
You will probably want to run a _V_A_C_U_U_M _A_N_A_L_Y_Z_E bbeeffoorree
100+
bbeeggiinnnniinngg pprroodduuccttiioonn wwoorrkk..
101+
102+
SSEEEE AALLSSOO
103+
initdb(1), postmaster(1), pg_dump(1), pg_dumpall(1), vacu-
104+
umdb(1)
105+
106+
107+
108+
109+
110+
111+
112+
113+
114+
115+
116+
117+
118+
119+
120+
121+
122+
123+
124+
125+
126+
127+
128+
129+
130+
14 Jan 2002 PG_UPGRADE(1) 2
131+
132+

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp