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
ba3231a2
Commit
ba3231a2
authored
Jan 11, 2002
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More cleanups.
parent
d91b4451
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
10 deletions
+16
-10
doc/src/sgml/ref/pg_upgrade.sgml
doc/src/sgml/ref/pg_upgrade.sgml
+8
-8
src/bin/pg_dump/pg_upgrade
src/bin/pg_dump/pg_upgrade
+8
-2
No files found.
doc/src/sgml/ref/pg_upgrade.sgml
View file @
ba3231a2
<!--
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/Attic/pg_upgrade.sgml,v 1.1
6 2002/01/11 04:39:19
momjian Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/ref/Attic/pg_upgrade.sgml,v 1.1
7 2002/01/11 06:08:02
momjian Exp $
PostgreSQL documentation
PostgreSQL documentation
-->
-->
...
@@ -54,13 +54,6 @@ pg_upgrade -s <replaceable class="parameter">filename</replaceable> <replaceable
...
@@ -54,13 +54,6 @@ pg_upgrade -s <replaceable class="parameter">filename</replaceable> <replaceable
</para>
</para>
</step>
</step>
<step performance="required">
<para>
<command>VACUUM</command> your entire database using
<command>vacuumdb -a</command.>
</para>
</step>
<step performance="required">
<step performance="required">
<para>
<para>
Then do:
Then do:
...
@@ -71,6 +64,13 @@ $ pg_dumpall -s > schema.out
...
@@ -71,6 +64,13 @@ $ pg_dumpall -s > schema.out
</para>
</para>
</step>
</step>
<step performance="required">
<para>
<command>VACUUM</command> your entire database using
<command>vacuumdb -a</command.>
</para>
</step>
<step performance="required">
<step performance="required">
<para>
<para>
Stop the old postmaster and all backends.
Stop the old postmaster and all backends.
...
...
src/bin/pg_dump/pg_upgrade
View file @
ba3231a2
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
# pg_upgrade: update a database without needing a full dump/reload cycle.
# pg_upgrade: update a database without needing a full dump/reload cycle.
# CAUTION: Read the manual page before trying to use this!
# CAUTION: Read the manual page before trying to use this!
# $Header: /cvsroot/pgsql/src/bin/pg_dump/Attic/pg_upgrade,v 1.2
5 2002/01/11 05:54:59
momjian Exp $
# $Header: /cvsroot/pgsql/src/bin/pg_dump/Attic/pg_upgrade,v 1.2
6 2002/01/11 06:08:02
momjian Exp $
#
#
# NOTE: we must be sure to update the version-checking code a few dozen lines
# NOTE: we must be sure to update the version-checking code a few dozen lines
# below for each new PostgreSQL release.
# below for each new PostgreSQL release.
...
@@ -99,6 +99,7 @@ case "$SRC_VERSION" in
...
@@ -99,6 +99,7 @@ case "$SRC_VERSION" in
esac
esac
pg_resetxlog 2>/dev/null
pg_resetxlog 2>/dev/null
# file not found status is normally 127, not 1
if
[
"
$?
"
-ne
1
]
if
[
"
$?
"
-ne
1
]
then
echo
"Unable to find pg_resetxlog in path.
then
echo
"Unable to find pg_resetxlog in path.
Install it from pgsql/contrib/pg_resetxlog and continue.; exiting"
1>&2
Install it from pgsql/contrib/pg_resetxlog and continue.; exiting"
1>&2
...
@@ -241,13 +242,15 @@ done
...
@@ -241,13 +242,15 @@ done
# Set this so the next VACUUM sets the old row XID's as "frozen"
# Set this so the next VACUUM sets the old row XID's as "frozen"
# Commit status already updated by vacuum above
pg_resetxlog
-x
"
$XID
"
data
pg_resetxlog
-x
"
$XID
"
data
if
[
"
$?
"
-ne
0
]
if
[
"
$?
"
-ne
0
]
then
echo
"Unable to set new XID.; exiting"
1>&2
then
echo
"Unable to set new XID.; exiting"
1>&2
exit
1
exit
1
fi
fi
#
s
et last checkpoint location from old database
#
S
et last checkpoint location from old database
CHKPOINT
=
`
pg_resetxlog
-n
"
$OLDDIR
"
|
grep
"checkpoint location:"
|
CHKPOINT
=
`
pg_resetxlog
-n
"
$OLDDIR
"
|
grep
"checkpoint location:"
|
awk
-F
' *'
'{print $4}'
`
awk
-F
' *'
'{print $4}'
`
...
@@ -256,6 +259,8 @@ then echo "Unable to get old checkpoint location.; exiting" 1>&2
...
@@ -256,6 +259,8 @@ then echo "Unable to get old checkpoint location.; exiting" 1>&2
exit
1
exit
1
fi
fi
# Set checkpoint location of new database
pg_resetxlog
-l
`
echo
"
$CHKPOINT
| tr '/' ' '
`
data
pg_resetxlog
-l
`
echo
"
$CHKPOINT
| tr '/' ' '
`
data
if
[
"
$?
"
-ne
0
]
if
[
"
$?
"
-ne
0
]
then
echo
"Unable to set new checkpoint location.; exiting"
1>&2
then
echo
"Unable to set new checkpoint location.; exiting"
1>&2
...
@@ -271,6 +276,7 @@ then echo "Unable to restart database server.; exiting" 1>&2
...
@@ -271,6 +276,7 @@ then echo "Unable to restart database server.; exiting" 1>&2
fi
fi
# Set sequence values for 7.1-version sequences, which were int4.
# Set sequence values for 7.1-version sequences, which were int4.
if
[
"
$SRC_VERSION
"
=
"7.1"
]
if
[
"
$SRC_VERSION
"
=
"7.1"
]
else
echo
"Set int8 sequence values from 7.1..."
else
echo
"Set int8 sequence values from 7.1..."
...
...
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