Skip to content

Commit ba3231a

Browse files
committed
More cleanups.
1 parent d91b445 commit ba3231a

File tree

2 files changed

+16
-10
lines changed

2 files changed

+16
-10
lines changed

doc/src/sgml/ref/pg_upgrade.sgml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/ref/Attic/pg_upgrade.sgml,v 1.16 2002/01/11 04:39:19 momjian Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/ref/Attic/pg_upgrade.sgml,v 1.17 2002/01/11 06:08:02 momjian Exp $
33
PostgreSQL documentation
44
-->
55

@@ -54,13 +54,6 @@ pg_upgrade -s <replaceable class="parameter">filename</replaceable> <replaceable
5454
</para>
5555
</step>
5656

57-
<step performance="required">
58-
<para>
59-
<command>VACUUM</command> your entire database using
60-
<command>vacuumdb -a</command.>
61-
</para>
62-
</step>
63-
6457
<step performance="required">
6558
<para>
6659
Then do:
@@ -71,6 +64,13 @@ $ pg_dumpall -s > schema.out
7164
</para>
7265
</step>
7366

67+
<step performance="required">
68+
<para>
69+
<command>VACUUM</command> your entire database using
70+
<command>vacuumdb -a</command.>
71+
</para>
72+
</step>
73+
7474
<step performance="required">
7575
<para>
7676
Stop the old postmaster and all backends.

src/bin/pg_dump/pg_upgrade

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# pg_upgrade: update a database without needing a full dump/reload cycle.
44
# CAUTION: Read the manual page before trying to use this!
55

6-
# $Header: /cvsroot/pgsql/src/bin/pg_dump/Attic/pg_upgrade,v 1.25 2002/01/11 05:54:59 momjian Exp $
6+
# $Header: /cvsroot/pgsql/src/bin/pg_dump/Attic/pg_upgrade,v 1.26 2002/01/11 06:08:02 momjian Exp $
77
#
88
# NOTE: we must be sure to update the version-checking code a few dozen lines
99
# below for each new PostgreSQL release.
@@ -99,6 +99,7 @@ case "$SRC_VERSION" in
9999
esac
100100

101101
pg_resetxlog 2>/dev/null
102+
# file not found status is normally 127, not 1
102103
if [ "$?" -ne 1 ]
103104
then echo "Unable to find pg_resetxlog in path.
104105
Install it from pgsql/contrib/pg_resetxlog and continue.; exiting" 1>&2
@@ -241,13 +242,15 @@ done
241242

242243

243244
# Set this so the next VACUUM sets the old row XID's as "frozen"
245+
# Commit status already updated by vacuum above
246+
244247
pg_resetxlog -x "$XID" data
245248
if [ "$?" -ne 0 ]
246249
then echo "Unable to set new XID.; exiting" 1>&2
247250
exit 1
248251
fi
249252

250-
# set last checkpoint location from old database
253+
# Set last checkpoint location from old database
251254

252255
CHKPOINT=`pg_resetxlog -n "$OLDDIR" | grep "checkpoint location:" |
253256
awk -F' *' '{print $4}'`
@@ -256,6 +259,8 @@ then echo "Unable to get old checkpoint location.; exiting" 1>&2
256259
exit 1
257260
fi
258261

262+
# Set checkpoint location of new database
263+
259264
pg_resetxlog -l `echo "$CHKPOINT | tr '/' ' '` data
260265
if [ "$?" -ne 0 ]
261266
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
271276
fi
272277
273278
# Set sequence values for 7.1-version sequences, which were int4.
279+
274280
if [ "$SRC_VERSION" = "7.1" ]
275281
else echo "Set int8 sequence values from 7.1..."
276282

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy