Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
86beaf4f
Commit
86beaf4f
authored
Jan 15, 2002
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add Peter's portability and option suggestions.
parent
ebf57dd0
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
112 additions
and
205 deletions
+112
-205
contrib/pg_upgrade/README
contrib/pg_upgrade/README
+13
-123
contrib/pg_upgrade/pg_upgrade
contrib/pg_upgrade/pg_upgrade
+99
-82
contrib/pg_upgrade/pg_upgrade.1
contrib/pg_upgrade/pg_upgrade.1
+0
-0
No files found.
contrib/pg_upgrade/README
View file @
86beaf4f
pg_upgrade
This is a version of pg_upgrade which will migrate a 7.1 database to 7.2,
or allow a 7.2 to 7.2 migration if you need to perform an initdb.
Read the manual page for more information. To view it:
PG_UPGRADE(1) PostgreSQL Client Applications PG_UPGRADE(1)
nroff -man pg_upgrade.1 | $PAGER
Bruce Momjian
NNAAMMEE
pg_upgrade - upgrade tool
2002-01-14
SSYYNNOOPPSSIISS
Allows upgrading from a previous release without reloading
data
--
DDEESSCCRRIIPPTTIIOONN
ppgg__uuppggrraaddee is a utility for upgrading from a previous
PostgreSQL release without reloading all the data. Not all
PostgreSQL releases can use this utility. Check the
release notes for details about your version.
ppgg__uuppggrraaddee must be run in two stages. In phase one you
must run ppgg__uuppggrraaddee with your old database installation in
place. In phase two, ppgg__uuppggrraaddee must be run on a freshly
iinniittddbb'ed current install. In both phases, the same
ppgg__uuppggrraaddee script matching the newly installed version
must be used.
UUppggrraaddiinngg PPoossttggrreeSSQQLL wwiitthh ppgg__uuppggrraaddee
1) Back up your existing data directory, preferably by
making a complete dump with ppgg__dduummppaallll..
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
from the current PostgreSQL distribution somewhere into
your path.
3) Change your working directory to the pgsql main direc-
tory, and type:
$$ ppgg__uuppggrraaddee --11
to collect information about the old database needed for
the upgrade.
4) Do:
$$ mmaakkee iinnssttaallll
to install the new binaries.
5) Do:
$$ ccdd ppggssqqll//ccoonnttrriibb//ppgg__rreesseettxxlloogg
$$ mmaakkee iinnssttaallll
to install the _p_g___r_e_s_e_t_x_l_o_g utility which is needed by
ppgg__uuppggrraaddee.
6) Run initdb to create a new template1 database contain-
ing the system tables for the new release. Make sure you
use settings similar to those used in your previous ver-
sion.
14 Jan 2002 PG_UPGRADE(1) 1
PG_UPGRADE(1) PostgreSQL Client Applications PG_UPGRADE(1)
7) Start the new _p_o_s_t_m_a_s_t_e_r_. (Note: it is critical that
no users connect to the server until the upgrade is com-
plete. You may wish to start the postmaster without -i or
alter pg_hba.conf temporarily.)
8) Change your working directory to the pgsql main direc-
tory again, and type:
$$ ppgg__uuppggrraaddee --22
The program will do some checking to make sure everything
is properly configured, and will then recreate all the
databases and tables you had, but with no data. It will
then physically move the data files containing non-system
tables and indexes into the proper subdirectories.
9) Restore your old _p_g___h_b_a_._c_o_n_f if needed to allow user
logins.
10) Carefully examine the contents of the upgraded
databases. If you detect problems, you'll need to recover
by restoring from your full ppgg__dduummppaallll backup. You can
delete the _p_g___u_p_g_r_a_d_e___i_n_f_o_/ directory when you are satis-
fied.
The upgraded databases will be in an un-vacuumed state.
You will probably want to run a _V_A_C_U_U_M _A_N_A_L_Y_Z_E before
beginning production work.
SSEEEE AALLSSOO
initdb(1), postmaster(1), pg_dump(1), pg_dumpall(1), vacu-
umdb(1)
14 Jan 2002 PG_UPGRADE(1) 2
To migrate this to newer versions of PostgreSQL:
1) Update the version numbers at the top of the file
2) Search for specific version mentions in the script and update
accordingly.
3) Add changes for next version.
contrib/pg_upgrade/pg_upgrade
View file @
86beaf4f
This diff is collapsed.
Click to expand it.
contrib/pg_upgrade/pg_upgrade.
man
→
contrib/pg_upgrade/pg_upgrade.
1
View file @
86beaf4f
File moved
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment