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: 57c081d)
Improve wording of some pg_upgrade failure reports.
2021年4月29日 19:40:34 +0000 (15:40 -0400)
2021年4月29日 19:40:34 +0000 (15:40 -0400)
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/2798740.1619622555@sss.pgh.pa.us


diff --git a/src/bin/pg_upgrade/check.c b/src/bin/pg_upgrade/check.c
index 19c15c7114dcfc84ea573950b36847d3be8bcf6d..955a1533d05dfa9b6dce6f7eb15d5d26ef298377 100644 (file)
--- 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 4fd9b8749bcb6abb59c0a18c884f851edd3bb30c..b531bda3e5c0bd185c36643b542c94e5a7195709 100644 (file)
--- 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);
}
This is the main PostgreSQL git repository.
RSS Atom

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