diff options
author | Bruce Momjian <bruce@momjian.us> | 2002-01-11 06:33:01 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2002-01-11 06:33:01 +0000 |
commit | 37c9346ef2af5e7a7d5e3fe25b4d6da3463edc69 (patch) | |
tree | 5c5ee436c4e70b401bbecf0d886059d619785aa1 /src | |
parent | ba3231a2a062da7d5932c05784759cf1acf40cdb (diff) | |
download | postgresql-37c9346ef2af5e7a7d5e3fe25b4d6da3463edc69.tar.gz postgresql-37c9346ef2af5e7a7d5e3fe25b4d6da3463edc69.zip |
pg_resetxlog specifies log location in hex; more pg_upgrade testing
improvments.
Diffstat (limited to 'src')
-rwxr-xr-x | src/bin/pg_dump/pg_upgrade | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/bin/pg_dump/pg_upgrade b/src/bin/pg_dump/pg_upgrade index 0dbb489f8ff..e893dbfc92f 100755 --- a/src/bin/pg_dump/pg_upgrade +++ b/src/bin/pg_dump/pg_upgrade @@ -3,7 +3,9 @@ # pg_upgrade: update a database without needing a full dump/reload cycle. # CAUTION: Read the manual page before trying to use this! -# $Header: /cvsroot/pgsql/src/bin/pg_dump/Attic/pg_upgrade,v 1.26 2002/01/11 06:08:02 momjian Exp $ +#set -x + +# $Header: /cvsroot/pgsql/src/bin/pg_dump/Attic/pg_upgrade,v 1.27 2002/01/11 06:33:01 momjian Exp $ # # NOTE: we must be sure to update the version-checking code a few dozen lines # below for each new PostgreSQL release. @@ -106,7 +108,7 @@ Install it from pgsql/contrib/pg_resetxlog and continue.; exiting" 1>&2 exit 1 fi -if ! pg_resetxlog -x | grep -q XID +if ! pg_resetxlog -x 2>&1 | grep -q XID then echo "Old version of pg_resetxlog found in path. Install a newer version from pgsql/contrib/pg_resetxlog.; exiting" 1>&2 exit 1 @@ -261,7 +263,7 @@ fi # Set checkpoint location of new database -pg_resetxlog -l `echo "$CHKPOINT | tr '/' ' '` data +pg_resetxlog -l `echo "$CHKPOINT" | tr '/' ' '` data if [ "$?" -ne 0 ] then echo "Unable to set new checkpoint location.; exiting" 1>&2 exit 1 @@ -278,7 +280,7 @@ fi # Set sequence values for 7.1-version sequences, which were int4. if [ "$SRC_VERSION" = "7.1" ] -else echo "Set int8 sequence values from 7.1..." +then echo "Set int8 sequence values from 7.1..." psql -d template1 -At -c "SELECT datname FROM pg_database" | while read DB @@ -355,10 +357,11 @@ SET relkind = 'S' WHERE relname = '$SEQUENCE'; SQL_END - if [ $? -ne 0 ] - then echo "There were errors during int4 sequence restore. - $0 aborted." 1>&2 - exit 1 + if [ $? -ne 0 ] + then echo "There were errors during int4 sequence restore. +$0 aborted." 1>&2 + exit 1 + fi done done fi |