summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Momjian2011-04-19 23:14:39 +0000
committerBruce Momjian2011-04-19 23:15:13 +0000
commit034194470647b3de206fb42464d49a438853fa5e (patch)
treea8ed389abb8f298a1be68fac569b3fdc0a0d2823
parent8c19977e9c515cc29af449a7ab6c25e496f539f3 (diff)
Add C comment
Add C comment about why we throw an error if the pg_upgrade old/new database counts don't match.
-rw-r--r--contrib/pg_upgrade/relfilenode.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/contrib/pg_upgrade/relfilenode.c b/contrib/pg_upgrade/relfilenode.c
index 9a0a3ac18d..6fb336cfc5 100644
--- a/contrib/pg_upgrade/relfilenode.c
+++ b/contrib/pg_upgrade/relfilenode.c
@@ -37,6 +37,12 @@ transfer_all_new_dbs(DbInfoArr *old_db_arr,
prep_status("Restoring user relation files\n");
+ /*
+ * If the user removed the 'postgres' database from the old cluster,
+ * this will cause the database counts to not match and throw an error.
+ * We could allow this to work because the new database is empty (we
+ * checked), but we don't.
+ */
if (old_db_arr->ndbs != new_db_arr->ndbs)
pg_log(PG_FATAL, "old and new clusters have a different number of databases\n");