Skip to content

Commit c9c37ae

Browse files
committed
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
1 parent 57c081d commit c9c37ae

File tree

2 files changed

+19
-17
lines changed

2 files changed

+19
-17
lines changed

src/bin/pg_upgrade/check.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1153,8 +1153,8 @@ check_for_reg_data_type_usage(ClusterInfo *cluster)
11531153
pg_fatal("Your installation contains one of the reg* data types in user tables.\n"
11541154
"These data types reference system OIDs that are not preserved by\n"
11551155
"pg_upgrade, so this cluster cannot currently be upgraded. You can\n"
1156-
"remove the problem tables and restart the upgrade. A list of the\n"
1157-
"problem columns is in the file:\n"
1156+
"drop the problem columns and restart the upgrade.\n"
1157+
"A list of the problem columns is in the file:\n"
11581158
" %s\n\n", output_path);
11591159
}
11601160
else
@@ -1181,9 +1181,9 @@ check_for_jsonb_9_4_usage(ClusterInfo *cluster)
11811181
pg_log(PG_REPORT, "fatal\n");
11821182
pg_fatal("Your installation contains the \"jsonb\" data type in user tables.\n"
11831183
"The internal format of \"jsonb\" changed during 9.4 beta so this\n"
1184-
"cluster cannot currently be upgraded. You can remove the problem\n"
1185-
"tables and restart the upgrade. A list of the problem columns is\n"
1186-
"in the file:\n"
1184+
"cluster cannot currently be upgraded. You can\n"
1185+
"drop the problem columns and restart the upgrade.\n"
1186+
"A list of the problem columns is in the file:\n"
11871187
" %s\n\n", output_path);
11881188
}
11891189
else

src/bin/pg_upgrade/version.c

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -276,11 +276,12 @@ old_9_3_check_for_line_data_type_usage(ClusterInfo *cluster)
276276
if (check_for_data_type_usage(cluster, "pg_catalog.line", output_path))
277277
{
278278
pg_log(PG_REPORT, "fatal\n");
279-
pg_fatal("Your installation contains the \"line\" data type in user tables. This\n"
280-
"data type changed its internal and input/output format between your old\n"
281-
"and new clusters so this cluster cannot currently be upgraded. You can\n"
282-
"remove the problem tables and restart the upgrade. A list of the problem\n"
283-
"columns is in the file:\n"
279+
pg_fatal("Your installation contains the \"line\" data type in user tables.\n"
280+
"This data type changed its internal and input/output format\n"
281+
"between your old and new versions so this\n"
282+
"cluster cannot currently be upgraded. You can\n"
283+
"drop the problem columns and restart the upgrade.\n"
284+
"A list of the problem columns is in the file:\n"
284285
" %s\n\n", output_path);
285286
}
286287
else
@@ -313,9 +314,10 @@ old_9_6_check_for_unknown_data_type_usage(ClusterInfo *cluster)
313314
if (check_for_data_type_usage(cluster, "pg_catalog.unknown", output_path))
314315
{
315316
pg_log(PG_REPORT, "fatal\n");
316-
pg_fatal("Your installation contains the \"unknown\" data type in user tables. This\n"
317-
"data type is no longer allowed in tables, so this cluster cannot currently\n"
318-
"be upgraded. You can remove the problem tables and restart the upgrade.\n"
317+
pg_fatal("Your installation contains the \"unknown\" data type in user tables.\n"
318+
"This data type is no longer allowed in tables, so this\n"
319+
"cluster cannot currently be upgraded. You can\n"
320+
"drop the problem columns and restart the upgrade.\n"
319321
"A list of the problem columns is in the file:\n"
320322
" %s\n\n", output_path);
321323
}
@@ -456,10 +458,10 @@ old_11_check_for_sql_identifier_data_type_usage(ClusterInfo *cluster)
456458
output_path))
457459
{
458460
pg_log(PG_REPORT, "fatal\n");
459-
pg_fatal("Your installation contains the \"sql_identifier\" data type in user tables\n"
460-
"and/or indexes. The on-disk format for this data type has changed, so this\n"
461-
"cluster cannot currently be upgraded. You can remove the problem tables or\n"
462-
"change the data type to \"name\" and restart the upgrade.\n"
461+
pg_fatal("Your installation contains the \"sql_identifier\" data type in user tables.\n"
462+
"The on-disk format for this data type has changed, so this\n"
463+
"cluster cannot currently be upgraded. You can\n"
464+
"drop the problem columns and restart the upgrade.\n"
463465
"A list of the problem columns is in the file:\n"
464466
" %s\n\n", output_path);
465467
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy