Skip to content

Commit 67eb3e5

Browse files
committed
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 b7f8465.
1 parent b015558 commit 67eb3e5

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

contrib/pg_upgrade/test.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,10 @@ newsrc=`cd ../.. && pwd`
6262
PATH=$bindir:$PATH
6363
export PATH
6464

65-
PGDATA=$temp_root/data
65+
BASE_PGDATA=$temp_root/data
66+
PGDATA="$BASE_PGDATA.old"
6667
export PGDATA
67-
rm -rf "$PGDATA" "$PGDATA".old
68+
rm -rf "$BASE_PGDATA" "$PGDATA"
6869

6970
unset PGDATABASE
7071
unset PGUSER
@@ -120,7 +121,7 @@ if [ -n "$pg_dumpall1_status" ]; then
120121
exit 1
121122
fi
122123

123-
mv "${PGDATA}" "${PGDATA}.old"
124+
PGDATA=$BASE_PGDATA
124125

125126
initdb -N
126127

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