Commit b7f8465c authored by Andrew Dunstan's avatar Andrew Dunstan

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.
parent cdc67938
...@@ -257,7 +257,7 @@ sub upgradecheck ...@@ -257,7 +257,7 @@ sub upgradecheck
("$tmp_install/bin", "$tmp_install/lib", $topdir, $topdir); ("$tmp_install/bin", "$tmp_install/lib", $topdir, $topdir);
$ENV{PATH} = "$bindir;$ENV{PATH}"; $ENV{PATH} = "$bindir;$ENV{PATH}";
my $data = "$tmp_root/data"; my $data = "$tmp_root/data";
$ENV{PGDATA} = $data; $ENV{PGDATA} = "$data.old";
my $logdir = "$topdir/contrib/pg_upgrade/log"; my $logdir = "$topdir/contrib/pg_upgrade/log";
(mkdir $logdir || die $!) unless -d $logdir; (mkdir $logdir || die $!) unless -d $logdir;
print "\nRunning initdb on old cluster\n\n"; print "\nRunning initdb on old cluster\n\n";
...@@ -272,10 +272,7 @@ sub upgradecheck ...@@ -272,10 +272,7 @@ sub upgradecheck
system("pg_dumpall -f $tmp_root/dump1.sql") == 0 or exit 1; system("pg_dumpall -f $tmp_root/dump1.sql") == 0 or exit 1;
print "\nStopping old cluster\n\n"; print "\nStopping old cluster\n\n";
system("pg_ctl -m fast stop") == 0 or exit 1; system("pg_ctl -m fast stop") == 0 or exit 1;
rename $data, "$data.old"; $ENV{PGDATA} = "$data";
# take a breather in case Windows hasn't quite got
# the message about the directory moving
sleep(5);
print "\nSetting up new cluster\n\n"; print "\nSetting up new cluster\n\n";
system("initdb") == 0 or exit 1; system("initdb") == 0 or exit 1;
print "\nRunning pg_upgrade\n\n"; print "\nRunning pg_upgrade\n\n";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment