Skip to content

Commit 4e37786

Browse files
committed
More testing, more cleanups.
1 parent 37c9346 commit 4e37786

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/bin/pg_dump/pg_upgrade

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
#set -x
77

8-
# $Header: /cvsroot/pgsql/src/bin/pg_dump/Attic/pg_upgrade,v 1.27 2002/01/11 06:33:01 momjian Exp $
8+
# $Header: /cvsroot/pgsql/src/bin/pg_dump/Attic/pg_upgrade,v 1.28 2002/01/11 06:48:41 momjian Exp $
99
#
1010
# NOTE: we must be sure to update the version-checking code a few dozen lines
1111
# below for each new PostgreSQL release.
@@ -158,7 +158,7 @@ fi
158158
# we are done with SQL database access
159159
# shutdown forces buffers to disk
160160

161-
pg_ctl stop
161+
pg_ctl -w stop
162162
if [ "$?" -ne 0 ]
163163
then echo "Unable to stop database server.; exiting" 1>&2
164164
exit 1
@@ -271,7 +271,7 @@ fi
271271

272272
# Restart server with moved data
273273

274-
pg_ctl start
274+
pg_ctl -w start
275275
if [ "$?" -ne 0 ]
276276
then echo "Unable to restart database server.; exiting" 1>&2
277277
exit 1
@@ -283,11 +283,14 @@ if [ "$SRC_VERSION" = "7.1" ]
283283
then echo "Set int8 sequence values from 7.1..."
284284

285285
psql -d template1 -At -c "SELECT datname FROM pg_database" |
286+
grep -v '^template0$' | # no system databases
287+
grep -v '^template1$' | # no system databases
286288
while read DB
287289
do
288290
echo "$DB"
289291
# XXX is concurrency a problem here?
290292
psql -d "$DB" -At -c "SELECT relname FROM pg_class where relkind = 'S';" |
293+
grep -v '^pg_' | # no system tables
291294
while read SEQUENCE
292295
do
293296
psql -d "$DB" -At <<SQL_END

0 commit comments

Comments
 (0)