diff options
author | Andrew Dunstan <andrew@dunslane.net> | 2013-03-30 12:44:29 -0400 |
---|---|---|
committer | Andrew Dunstan <andrew@dunslane.net> | 2013-03-30 12:44:29 -0400 |
commit | 67eb3e5075b52bb9d91dc3bd9358ac1da2ded5fc (patch) | |
tree | 97e1ee8143f95c90aa476a85fb57ec82f7df7f65 /contrib/pg_upgrade | |
parent | b015558091075a898a8348934f1d36386d87f5e5 (diff) | |
download | postgresql-67eb3e5075b52bb9d91dc3bd9358ac1da2ded5fc.tar.gz |
Avoid moving data directory in upgrade testing.
Windows sometimes gets upset if we rename a large directory and then try
to use the old name quickly, as seen in occasional buildfarm failures.
So we avoid that by building the old version in the intended
destination in the first place instead of renaming it, similar to the
change made for the same reason in commit b7f8465c.
Diffstat (limited to 'contrib/pg_upgrade')
-rw-r--r-- | contrib/pg_upgrade/test.sh | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/contrib/pg_upgrade/test.sh b/contrib/pg_upgrade/test.sh index d33dd52afe..0dcbc93d41 100644 --- a/contrib/pg_upgrade/test.sh +++ b/contrib/pg_upgrade/test.sh @@ -62,9 +62,10 @@ newsrc=`cd ../.. && pwd` PATH=$bindir:$PATH export PATH -PGDATA=$temp_root/data +BASE_PGDATA=$temp_root/data +PGDATA="$BASE_PGDATA.old" export PGDATA -rm -rf "$PGDATA" "$PGDATA".old +rm -rf "$BASE_PGDATA" "$PGDATA" unset PGDATABASE unset PGUSER @@ -120,7 +121,7 @@ if [ -n "$pg_dumpall1_status" ]; then exit 1 fi -mv "${PGDATA}" "${PGDATA}.old" +PGDATA=$BASE_PGDATA initdb -N |