git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2f6501f)
Fix thinko with subdirectories generated by pg_upgrade for internal files
2022年2月15日 02:46:55 +0000 (11:46 +0900)
2022年2月15日 02:46:55 +0000 (11:46 +0900)
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.


diff --git a/src/bin/pg_upgrade/pg_upgrade.c b/src/bin/pg_upgrade/pg_upgrade.c
index 77beb116398a7992e81156a2bff366cae710b032..f66bbd530799f65f7ecc409077c0f10d5ce53bda 100644 (file)
--- a/src/bin/pg_upgrade/pg_upgrade.c
+++ b/src/bin/pg_upgrade/pg_upgrade.c
@@ -225,9 +225,9 @@ make_outputdirs(char *pgdata)
log_opts.basedir = (char *) pg_malloc(MAXPGPATH);
snprintf(log_opts.basedir, MAXPGPATH, "%s/%s", pgdata, BASE_OUTPUTDIR);
log_opts.dumpdir = (char *) pg_malloc(MAXPGPATH);
- snprintf(log_opts.dumpdir, MAXPGPATH, "%s/%s", pgdata, LOG_OUTPUTDIR);
+ snprintf(log_opts.dumpdir, MAXPGPATH, "%s/%s", pgdata, DUMP_OUTPUTDIR);
log_opts.logdir = (char *) pg_malloc(MAXPGPATH);
- snprintf(log_opts.logdir, MAXPGPATH, "%s/%s", pgdata, DUMP_OUTPUTDIR);
+ snprintf(log_opts.logdir, MAXPGPATH, "%s/%s", pgdata, LOG_OUTPUTDIR);
if (mkdir(log_opts.basedir, pg_dir_create_mode))
pg_fatal("could not create directory \"%s\": %m\n", log_opts.basedir);
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /