1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

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/2798740.1619622555@sss.pgh.pa.us
This commit is contained in:
Tom Lane
2021-04-29 15:40:34 -04:00
parent 57c081de0a
commit c9c37ae03f
2 changed files with 19 additions and 17 deletions

View File

@ -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

View File

@ -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);
}