summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Momjian2011-10-28 12:07:30 +0000
committerBruce Momjian2011-10-28 12:09:15 +0000
commit9846dcfb9e8273d2ef93a1650225d013a1436349 (patch)
treec0df49fcde6cd3edfb8ceac954b12a7e799aeb79
parentece12659cf1695d318445b837b36edc15b6f25d6 (diff)
Clarify pg_upgrade error message that the 'postgres' database must exist
in the old cluster.
-rw-r--r--contrib/pg_upgrade/check.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/contrib/pg_upgrade/check.c b/contrib/pg_upgrade/check.c
index 5b9b4cd3d5..e400814617 100644
--- a/contrib/pg_upgrade/check.c
+++ b/contrib/pg_upgrade/check.c
@@ -403,8 +403,13 @@ check_old_cluster_has_new_cluster_dbs(void)
new_cluster.dbarr.dbs[new_dbnum].db_name) == 0)
break;
if (old_dbnum == old_cluster.dbarr.ndbs)
- pg_log(PG_FATAL, "New cluster database \"%s\" does not exist in the old cluster\n",
- new_cluster.dbarr.dbs[new_dbnum].db_name);
+ {
+ if (strcmp(new_cluster.dbarr.dbs[new_dbnum].db_name, "postgres") == 0)
+ pg_log(PG_FATAL, "The \"postgres\" database must exist in the old cluster\n");
+ else
+ pg_log(PG_FATAL, "New cluster database \"%s\" does not exist in the old cluster\n",
+ new_cluster.dbarr.dbs[new_dbnum].db_name);
+ }
}
}