summaryrefslogtreecommitdiff
path: root/src/bin/pg_upgrade/version.c
diff options
context:
space:
mode:
authorMichael Paquier2022-09-13 01:38:56 +0000
committerMichael Paquier2022-09-13 01:38:56 +0000
commitee5353abb6124de5ffd24ef1cedbc2a7196d4fd5 (patch)
treeda6ed57d98ec4c8688654a0ad14d0521f059d240 /src/bin/pg_upgrade/version.c
parent6b89ce1a21f909f616db165dcc6d8d2918fbc185 (diff)
Move any remaining files generated by pg_upgrade into an internal subdir
This change concerns a couple of .txt files (for internal state checks) that were still written in the path where the binary is executed, and not in the subdirectory located in the target cluster. Like the other .txt files doing already so (like loadable_libraries.txt), these are saved in the base output directory. Note that on failure, the logs report the full path to the .txt file generated, so these are easy to find. Oversight in 38bfae3. Author: Daniel Gustafsson Reviewed-by: Michael Paquier, Justin Prysby Discussion: https://postgr.es/m/[email protected] Backpatch-through: 15
Diffstat (limited to 'src/bin/pg_upgrade/version.c')
-rw-r--r--src/bin/pg_upgrade/version.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/bin/pg_upgrade/version.c b/src/bin/pg_upgrade/version.c
index 064d23797c5..dc19fc6ec84 100644
--- a/src/bin/pg_upgrade/version.c
+++ b/src/bin/pg_upgrade/version.c
@@ -183,7 +183,9 @@ old_9_3_check_for_line_data_type_usage(ClusterInfo *cluster)
prep_status("Checking for incompatible \"line\" data type");
- snprintf(output_path, sizeof(output_path), "tables_using_line.txt");
+ snprintf(output_path, sizeof(output_path), "%s/%s",
+ log_opts.basedir,
+ "tables_using_line.txt");
if (check_for_data_type_usage(cluster, "pg_catalog.line", output_path))
{
@@ -221,7 +223,9 @@ old_9_6_check_for_unknown_data_type_usage(ClusterInfo *cluster)
prep_status("Checking for invalid \"unknown\" user columns");
- snprintf(output_path, sizeof(output_path), "tables_using_unknown.txt");
+ snprintf(output_path, sizeof(output_path), "%s/%s",
+ log_opts.basedir,
+ "tables_using_unknown.txt");
if (check_for_data_type_usage(cluster, "pg_catalog.unknown", output_path))
{
@@ -364,7 +368,9 @@ old_11_check_for_sql_identifier_data_type_usage(ClusterInfo *cluster)
prep_status("Checking for invalid \"sql_identifier\" user columns");
- snprintf(output_path, sizeof(output_path), "tables_using_sql_identifier.txt");
+ snprintf(output_path, sizeof(output_path), "%s/%s",
+ log_opts.basedir,
+ "tables_using_sql_identifier.txt");
if (check_for_data_type_usage(cluster, "information_schema.sql_identifier",
output_path))