|
|
|
|
@ -62,13 +62,15 @@ output_check_banner(bool live_check) |
|
|
|
|
{ |
|
|
|
|
if (user_opts.check && live_check) |
|
|
|
|
{ |
|
|
|
|
pg_log(PG_REPORT, "Performing Consistency Checks on Old Live Server\n"); |
|
|
|
|
pg_log(PG_REPORT, "------------------------------------------------\n"); |
|
|
|
|
pg_log(PG_REPORT, |
|
|
|
|
"Performing Consistency Checks on Old Live Server\n" |
|
|
|
|
"------------------------------------------------\n"); |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
pg_log(PG_REPORT, "Performing Consistency Checks\n"); |
|
|
|
|
pg_log(PG_REPORT, "-----------------------------\n"); |
|
|
|
|
pg_log(PG_REPORT, |
|
|
|
|
"Performing Consistency Checks\n" |
|
|
|
|
"-----------------------------\n"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -991,7 +993,7 @@ check_for_jsonb_9_4_usage(ClusterInfo *cluster) |
|
|
|
|
bool found = false; |
|
|
|
|
char output_path[MAXPGPATH]; |
|
|
|
|
|
|
|
|
|
prep_status("Checking for JSONB user data types"); |
|
|
|
|
prep_status("Checking for incompatible jsonb data type"); |
|
|
|
|
|
|
|
|
|
snprintf(output_path, sizeof(output_path), "tables_using_jsonb.txt"); |
|
|
|
|
|
|
|
|
|
@ -1022,7 +1024,7 @@ check_for_jsonb_9_4_usage(ClusterInfo *cluster) |
|
|
|
|
" a.atttypid = 'pg_catalog.jsonb'::pg_catalog.regtype AND " |
|
|
|
|
" c.relnamespace = n.oid AND " |
|
|
|
|
/* exclude possible orphaned temp tables */ |
|
|
|
|
" n.nspname !~ '^pg_temp_' AND " |
|
|
|
|
" n.nspname !~ '^pg_temp_' AND " |
|
|
|
|
" n.nspname NOT IN ('pg_catalog', 'information_schema')"); |
|
|
|
|
|
|
|
|
|
ntups = PQntuples(res); |
|
|
|
|
@ -1057,8 +1059,8 @@ check_for_jsonb_9_4_usage(ClusterInfo *cluster) |
|
|
|
|
if (found) |
|
|
|
|
{ |
|
|
|
|
pg_log(PG_REPORT, "fatal\n"); |
|
|
|
|
pg_fatal("Your installation contains one of the JSONB data types in user tables.\n" |
|
|
|
|
"The internal format of JSONB changed during 9.4 beta so this cluster cannot currently\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 cluster cannot currently\n" |
|
|
|
|
"be upgraded. You can remove the problem tables and restart the upgrade. A list\n" |
|
|
|
|
"of the problem columns is in the file:\n" |
|
|
|
|
" %s\n\n", output_path); |
|
|
|
|
@ -1078,7 +1080,7 @@ check_for_pg_role_prefix(ClusterInfo *cluster) |
|
|
|
|
PGresult *res; |
|
|
|
|
PGconn *conn = connectToServer(cluster, "template1"); |
|
|
|
|
|
|
|
|
|
prep_status("Checking for roles starting with 'pg_'"); |
|
|
|
|
prep_status("Checking for roles starting with \"pg_\""); |
|
|
|
|
|
|
|
|
|
res = executeQueryOrDie(conn, |
|
|
|
|
"SELECT * " |
|
|
|
|
@ -1088,9 +1090,9 @@ check_for_pg_role_prefix(ClusterInfo *cluster) |
|
|
|
|
if (PQntuples(res) != 0) |
|
|
|
|
{ |
|
|
|
|
if (cluster == &old_cluster) |
|
|
|
|
pg_fatal("The source cluster contains roles starting with 'pg_'\n"); |
|
|
|
|
pg_fatal("The source cluster contains roles starting with \"pg_\"\n"); |
|
|
|
|
else |
|
|
|
|
pg_fatal("The target cluster contains roles starting with 'pg_'\n"); |
|
|
|
|
pg_fatal("The target cluster contains roles starting with \"pg_\"\n"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
PQclear(res); |
|
|
|
|
|