Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit9846dcf

Browse files
committed
Clarify pg_upgrade error message that the 'postgres' database must exist
in the old cluster.
1 parentece1265 commit9846dcf

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)

[8]ページ先頭

©2009-2025 Movatter.jp