Skip to content

Commit 9846dcf

Browse files
committed
Clarify pg_upgrade error message that the 'postgres' database must exist
in the old cluster.
1 parent ece1265 commit 9846dcf

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

contrib/pg_upgrade/check.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -403,8 +403,13 @@ check_old_cluster_has_new_cluster_dbs(void)
403403
new_cluster.dbarr.dbs[new_dbnum].db_name) == 0)
404404
break;
405405
if (old_dbnum == old_cluster.dbarr.ndbs)
406-
pg_log(PG_FATAL, "New cluster database \"%s\" does not exist in the old cluster\n",
407-
new_cluster.dbarr.dbs[new_dbnum].db_name);
406+
{
407+
if (strcmp(new_cluster.dbarr.dbs[new_dbnum].db_name, "postgres") == 0)
408+
pg_log(PG_FATAL, "The \"postgres\" database must exist in the old cluster\n");
409+
else
410+
pg_log(PG_FATAL, "New cluster database \"%s\" does not exist in the old cluster\n",
411+
new_cluster.dbarr.dbs[new_dbnum].db_name);
412+
}
408413
}
409414
}
410415

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