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

Commit86beaf4

Browse files
committed
Add Peter's portability and option suggestions.
1 parentebf57dd commit86beaf4

File tree

3 files changed

+112
-205
lines changed

3 files changed

+112
-205
lines changed

‎contrib/pg_upgrade/README

Lines changed: 13 additions & 123 deletions
Original file line numberDiff line numberDiff line change
@@ -1,132 +1,22 @@
1+
pg_upgrade
12

3+
This is a version of pg_upgrade which will migrate a 7.1 database to 7.2,
4+
or allow a 7.2 to 7.2 migration if you need to perform an initdb.
25

6+
Read the manual page for more information. To view it:
37

4-
PG_UPGRADE(1) PostgreSQL Client Applications PG_UPGRADE(1)
8+
nroff -man pg_upgrade.1 | $PAGER
59

10+
Bruce Momjian
611

7-
NNAAMMEE
8-
pg_upgrade - upgrade tool
12+
2002-01-14
913

10-
SSYYNNOOPPSSIISS
11-
Allows upgrading from a previous release without reloading
12-
data
14+
--
1315

14-
DDEESSCCRRIIPPTTIIOONN
15-
ppgg__uuppggrraaddee is a utility for upgrading from a previous
16-
PostgreSQL release without reloading all the data. Not all
17-
PostgreSQL releases can use this utility. Check the
18-
release notes for details about your version.
19-
20-
ppgg__uuppggrraaddee must be run in two stages. In phase one you
21-
must run ppgg__uuppggrraaddee with your old database installation in
22-
place. In phase two, ppgg__uuppggrraaddee must be run on a freshly
23-
iinniittddbb'ed current install. In both phases, the same
24-
ppgg__uuppggrraaddee 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 ppgg__dduummppaallll..
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-
ppgg__uuppggrraaddee.
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 again, 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 ppgg__dduummppaallll backup. You can
96-
delete the _p_g___u_p_g_r_a_d_e___i_n_f_o_/ directory when you are satis-
97-
fied.
98-
99-
The upgraded databases will be in an un-vacuumed state.
100-
You will probably want to run a _V_A_C_U_U_M _A_N_A_L_Y_Z_E before
101-
beginning production work.
102-
103-
SSEEEE AALLSSOO
104-
initdb(1), postmaster(1), pg_dump(1), pg_dumpall(1), vacu-
105-
umdb(1)
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
16+
To migrate this to newer versions of PostgreSQL:
13117

18+
1) Update the version numbers at the top of the file
19+
2) Search for specific version mentions in the script and update
20+
accordingly.
21+
3) Add changes for next version.
13222

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp