diff options
author | Tom Lane | 2021-04-29 19:40:34 +0000 |
---|---|---|
committer | Tom Lane | 2021-04-29 19:40:34 +0000 |
commit | c9c37ae03fea0c8ad467392ddf03940b61974935 (patch) | |
tree | 04426a57491d3c4bc4c3226fb48d481c2da14bb5 | |
parent | 57c081de0afcd01bf47c46f015bf8886b01c2c21 (diff) |
Improve wording of some pg_upgrade failure reports.
Don't advocate dropping a whole table when dropping a column would
serve. While at it, try to make the layout of these messages a
bit cleaner and more consistent.
Per suggestion from Daniel Gustafsson. No back-patch, as we generally
don't like to churn translatable messages in released branches.
Discussion: https://postgr.es/m/[email protected]
-rw-r--r-- | src/bin/pg_upgrade/check.c | 10 | ||||
-rw-r--r-- | src/bin/pg_upgrade/version.c | 26 |
2 files changed, 19 insertions, 17 deletions
diff --git a/src/bin/pg_upgrade/check.c b/src/bin/pg_upgrade/check.c index 19c15c7114..955a1533d0 100644 --- a/src/bin/pg_upgrade/check.c +++ b/src/bin/pg_upgrade/check.c @@ -1153,8 +1153,8 @@ check_for_reg_data_type_usage(ClusterInfo *cluster) pg_fatal("Your installation contains one of the reg* data types in user tables.\n" "These data types reference system OIDs that are not preserved by\n" "pg_upgrade, so this cluster cannot currently be upgraded. You can\n" - "remove the problem tables and restart the upgrade. A list of the\n" - "problem columns is in the file:\n" + "drop the problem columns and restart the upgrade.\n" + "A list of the problem columns is in the file:\n" " %s\n\n", output_path); } else @@ -1181,9 +1181,9 @@ check_for_jsonb_9_4_usage(ClusterInfo *cluster) pg_log(PG_REPORT, "fatal\n"); pg_fatal("Your installation contains the \"jsonb\" data type in user tables.\n" "The internal format of \"jsonb\" changed during 9.4 beta so this\n" - "cluster cannot currently be upgraded. You can remove the problem\n" - "tables and restart the upgrade. A list of the problem columns is\n" - "in the file:\n" + "cluster cannot currently be upgraded. You can\n" + "drop the problem columns and restart the upgrade.\n" + "A list of the problem columns is in the file:\n" " %s\n\n", output_path); } else diff --git a/src/bin/pg_upgrade/version.c b/src/bin/pg_upgrade/version.c index 4fd9b8749b..b531bda3e5 100644 --- a/src/bin/pg_upgrade/version.c +++ b/src/bin/pg_upgrade/version.c @@ -276,11 +276,12 @@ old_9_3_check_for_line_data_type_usage(ClusterInfo *cluster) if (check_for_data_type_usage(cluster, "pg_catalog.line", output_path)) { pg_log(PG_REPORT, "fatal\n"); - pg_fatal("Your installation contains the \"line\" data type in user tables. This\n" - "data type changed its internal and input/output format between your old\n" - "and new clusters so this cluster cannot currently be upgraded. You can\n" - "remove the problem tables and restart the upgrade. A list of the problem\n" - "columns is in the file:\n" + pg_fatal("Your installation contains the \"line\" data type in user tables.\n" + "This data type changed its internal and input/output format\n" + "between your old and new versions so this\n" + "cluster cannot currently be upgraded. You can\n" + "drop the problem columns and restart the upgrade.\n" + "A list of the problem columns is in the file:\n" " %s\n\n", output_path); } else @@ -313,9 +314,10 @@ old_9_6_check_for_unknown_data_type_usage(ClusterInfo *cluster) if (check_for_data_type_usage(cluster, "pg_catalog.unknown", output_path)) { pg_log(PG_REPORT, "fatal\n"); - pg_fatal("Your installation contains the \"unknown\" data type in user tables. This\n" - "data type is no longer allowed in tables, so this cluster cannot currently\n" - "be upgraded. You can remove the problem tables and restart the upgrade.\n" + pg_fatal("Your installation contains the \"unknown\" data type in user tables.\n" + "This data type is no longer allowed in tables, so this\n" + "cluster cannot currently be upgraded. You can\n" + "drop the problem columns and restart the upgrade.\n" "A list of the problem columns is in the file:\n" " %s\n\n", output_path); } @@ -456,10 +458,10 @@ old_11_check_for_sql_identifier_data_type_usage(ClusterInfo *cluster) output_path)) { pg_log(PG_REPORT, "fatal\n"); - pg_fatal("Your installation contains the \"sql_identifier\" data type in user tables\n" - "and/or indexes. The on-disk format for this data type has changed, so this\n" - "cluster cannot currently be upgraded. You can remove the problem tables or\n" - "change the data type to \"name\" and restart the upgrade.\n" + pg_fatal("Your installation contains the \"sql_identifier\" data type in user tables.\n" + "The on-disk format for this data type has changed, so this\n" + "cluster cannot currently be upgraded. You can\n" + "drop the problem columns and restart the upgrade.\n" "A list of the problem columns is in the file:\n" " %s\n\n", output_path); } |