aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/test/regress/pg_regress.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/test/regress/pg_regress.c b/src/test/regress/pg_regress.c
index 1e8e2ccd2f1..5523a162258 100644
--- a/src/test/regress/pg_regress.c
+++ b/src/test/regress/pg_regress.c
@@ -2672,6 +2672,19 @@ regression_main(int argc, char *argv[], init_function ifunc, test_function tfunc
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);
/*