Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9846dcf

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

File tree

Expand file treeCollapse file tree

1 file changed

+7
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+7
-2
lines changed

‎contrib/pg_upgrade/check.c

Copy file name to clipboardExpand all lines: contrib/pg_upgrade/check.c
+7-2Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.