Skip to content

Commit a008496

Browse files
committed
Fix thinko with subdirectories generated by pg_upgrade for internal files
38bfae3 has mixed the "dump/" and "log/" subdirectories generated in "pg_upgrade_output.d/", causing the internal dump files to be generated in "log/" and the log files to be in "dump/", but the opposite should be done. This was not directly an issue for pg_upgrade runs, as the internal dump files were still picked up at the location of their creation, but the newest version of the buildfarm client would have reported the dump files instead of the log files on failures of pg_upgrade. Issue spotted while testing the TAP tests of pg_upgrade.
1 parent 2f6501f commit a008496

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/bin/pg_upgrade/pg_upgrade.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,9 +225,9 @@ make_outputdirs(char *pgdata)
225225
log_opts.basedir = (char *) pg_malloc(MAXPGPATH);
226226
snprintf(log_opts.basedir, MAXPGPATH, "%s/%s", pgdata, BASE_OUTPUTDIR);
227227
log_opts.dumpdir = (char *) pg_malloc(MAXPGPATH);
228-
snprintf(log_opts.dumpdir, MAXPGPATH, "%s/%s", pgdata, LOG_OUTPUTDIR);
228+
snprintf(log_opts.dumpdir, MAXPGPATH, "%s/%s", pgdata, DUMP_OUTPUTDIR);
229229
log_opts.logdir = (char *) pg_malloc(MAXPGPATH);
230-
snprintf(log_opts.logdir, MAXPGPATH, "%s/%s", pgdata, DUMP_OUTPUTDIR);
230+
snprintf(log_opts.logdir, MAXPGPATH, "%s/%s", pgdata, LOG_OUTPUTDIR);
231231

232232
if (mkdir(log_opts.basedir, pg_dir_create_mode))
233233
pg_fatal("could not create directory \"%s\": %m\n", log_opts.basedir);

0 commit comments

Comments
 (0)