5
5
6
6
# set -x
7
7
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 $
9
9
#
10
10
# NOTE: we must be sure to update the version-checking code a few dozen lines
11
11
# below for each new PostgreSQL release.
158
158
# we are done with SQL database access
159
159
# shutdown forces buffers to disk
160
160
161
- pg_ctl stop
161
+ pg_ctl-w stop
162
162
if [" $? " -ne 0 ]
163
163
then echo " Unable to stop database server.; exiting" 1>&2
164
164
exit 1
271
271
272
272
# Restart server with moved data
273
273
274
- pg_ctl start
274
+ pg_ctl-w start
275
275
if [" $? " -ne 0 ]
276
276
then echo " Unable to restart database server.; exiting" 1>&2
277
277
exit 1
@@ -283,11 +283,14 @@ if [ "$SRC_VERSION" = "7.1" ]
283
283
then echo " Set int8 sequence values from 7.1..."
284
284
285
285
psql -d template1 -At -c" SELECT datname FROM pg_database" |
286
+ grep -v' ^template0$' | # no system databases
287
+ grep -v' ^template1$' | # no system databases
286
288
while read DB
287
289
do
288
290
echo " $DB "
289
291
# XXX is concurrency a problem here?
290
292
psql -d" $DB " -At -c" SELECT relname FROM pg_class where relkind = 'S';" |
293
+ grep -v' ^pg_' | # no system tables
291
294
while read SEQUENCE
292
295
do
293
296
psql -d" $DB " -At<< SQL_END