if (directory_exists(testtablespace))
if (!rmtree(testtablespace, true))
{
- fprintf(stderr, _("\n%s: could not remove test tablespace \"%s\": %s\n"),
- progname, testtablespace, strerror(errno));
+ fprintf(stderr, _("\n%s: could not remove test tablespace \"%s\"\n"),
+ progname, testtablespace);
exit(2);
}
make_directory(testtablespace);
header(_("removing existing temp installation"));
if (!rmtree(temp_install, true))
{
- fprintf(stderr, _("\n%s: could not remove temp installation \"%s\": %s\n"), progname, temp_install, strerror(errno));
+ fprintf(stderr, _("\n%s: could not remove temp installation \"%s\"\n"),
+ progname, temp_install);
exit(2);
}
}
stop_postmaster();
}
+ /*
+ * If there were no errors, remove the temp installation immediately to
+ * conserve disk space. (If there were errors, we leave the installation
+ * in place for possible manual investigation.)
+ */
+ if (temp_install && fail_count == 0 && fail_ignore_count == 0)
+ {
+ header(_("removing temporary installation"));
+ if (!rmtree(temp_install, true))
+ fprintf(stderr, _("\n%s: could not remove temp installation \"%s\"\n"),
+ progname, temp_install);
+ }
+
fclose(logfile);
/*