Skip to content

Commit 9faa6ae

Browse files
committed
Fix location of output logs of pg_regress
initdb.log and postmaster.log were moved to within the temporary instance path by commit dcae5fa. This directory now gets removed at the end of the run of pg_regress when there are no failures found, which makes analysis of after-run issues difficult in some cases, and reduces the output verbosity of the buildfarm after a run. Fix by Michael Paquier Backpatch to 9.5
1 parent 149b1dd commit 9faa6ae

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/test/regress/pg_regress.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2207,7 +2207,7 @@ regression_main(int argc, char *argv[], init_function ifunc, test_function tfunc
22072207
make_directory(temp_instance);
22082208

22092209
/* and a directory for log files */
2210-
snprintf(buf, sizeof(buf), "%s/log", temp_instance);
2210+
snprintf(buf, sizeof(buf), "%s/log", outputdir);
22112211
if (!directory_exists(buf))
22122212
make_directory(buf);
22132213

@@ -2220,10 +2220,10 @@ regression_main(int argc, char *argv[], init_function ifunc, test_function tfunc
22202220
temp_instance,
22212221
debug ? " --debug" : "",
22222222
nolocale ? " --no-locale" : "",
2223-
temp_instance);
2223+
outputdir);
22242224
if (system(buf))
22252225
{
2226-
fprintf(stderr, _("\n%s: initdb failed\nExamine %s/log/initdb.log for the reason.\nCommand was: %s\n"), progname, temp_instance, buf);
2226+
fprintf(stderr, _("\n%s: initdb failed\nExamine %s/log/initdb.log for the reason.\nCommand was: %s\n"), progname, outputdir, buf);
22272227
exit(2);
22282228
}
22292229

@@ -2324,7 +2324,7 @@ regression_main(int argc, char *argv[], init_function ifunc, test_function tfunc
23242324
bindir ? "/" : "",
23252325
temp_instance, debug ? " -d 5" : "",
23262326
hostname ? hostname : "", sockdir ? sockdir : "",
2327-
temp_instance);
2327+
outputdir);
23282328
postmaster_pid = spawn_process(buf);
23292329
if (postmaster_pid == INVALID_PID)
23302330
{
@@ -2353,15 +2353,15 @@ regression_main(int argc, char *argv[], init_function ifunc, test_function tfunc
23532353
if (WaitForSingleObject(postmaster_pid, 0) == WAIT_OBJECT_0)
23542354
#endif
23552355
{
2356-
fprintf(stderr, _("\n%s: postmaster failed\nExamine %s/log/postmaster.log for the reason\n"), progname, temp_instance);
2356+
fprintf(stderr, _("\n%s: postmaster failed\nExamine %s/log/postmaster.log for the reason\n"), progname, outputdir);
23572357
exit(2);
23582358
}
23592359

23602360
pg_usleep(1000000L);
23612361
}
23622362
if (i >= 60)
23632363
{
2364-
fprintf(stderr, _("\n%s: postmaster did not respond within 60 seconds\nExamine %s/log/postmaster.log for the reason\n"), progname, temp_instance);
2364+
fprintf(stderr, _("\n%s: postmaster did not respond within 60 seconds\nExamine %s/log/postmaster.log for the reason\n"), progname, outputdir);
23652365

23662366
/*
23672367
* If we get here, the postmaster is probably wedged somewhere in

0 commit comments

Comments
 (0)