summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Dunstan <andrew@dunslane.net>2013-03-23 16:31:01 -0400
committerAndrew Dunstan <andrew@dunslane.net>2013-03-23 16:31:01 -0400
commitcc9bee16bfb759068fde9d61c0fa612950837ed0 (patch)
treee2a8d7fe2ab4a3e61f4d8aec108b23771d673f39 /src
parent00298ad9d8c9da42f338ecd0c6b3a7b737d387ee (diff)
Avoid renaming data directory during MSVC upgrade testing.
This appears to cause some intermittent file system problems on Windows 8. Instead, set up the old data directory in its intended final location to start with.
Diffstat (limited to 'src')
-rw-r--r--src/tools/msvc/vcregress.pl7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/tools/msvc/vcregress.pl b/src/tools/msvc/vcregress.pl
index c0f9fc674cb..cdba9a5fb71 100644
--- a/src/tools/msvc/vcregress.pl
+++ b/src/tools/msvc/vcregress.pl
@@ -257,7 +257,7 @@ sub upgradecheck
("$tmp_install/bin", "$tmp_install/lib", $topdir, $topdir);
$ENV{PATH} = "$bindir;$ENV{PATH}";
my $data = "$tmp_root/data";
- $ENV{PGDATA} = $data;
+ $ENV{PGDATA} = "$data.old";
my $logdir = "$topdir/contrib/pg_upgrade/log";
(mkdir $logdir || die $!) unless -d $logdir;
print "\nRunning initdb on old cluster\n\n";
@@ -272,10 +272,7 @@ sub upgradecheck
system("pg_dumpall -f $tmp_root/dump1.sql") == 0 or exit 1;
print "\nStopping old cluster\n\n";
system("pg_ctl -m fast stop") == 0 or exit 1;
- rename $data, "$data.old";
- # take a breather in case Windows hasn't quite got
- # the message about the directory moving
- sleep(5);
+ $ENV{PGDATA} = "$data";
print "\nSetting up new cluster\n\n";
system("initdb") == 0 or exit 1;
print "\nRunning pg_upgrade\n\n";