summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Paquier2019-12-06 02:55:04 +0000
committerMichael Paquier2019-12-06 02:55:04 +0000
commit690c880269bf08dfb3f5bffb02be67e7e2a6c0f3 (patch)
treef5bd91e856e2a339182680a0b7286abb2c38f59f /src
parent28f4bba66b572d6b3b8dc4fcf4e585821e0a5363 (diff)
Improve some comments in pg_upgrade.c
When restoring database schemas on a new cluster, database "template1" is processed first, followed by all other databases in parallel, including "postgres". Both "postgres" and "template1" have some extra handling to propagate each one's properties, but comments were confusing regarding which one is processed where. Author: Julien Rouhaud Reviewed-by: Daniel Gustafsson Discussion: https://postgr.es/m/CAOBaU_a2iviTG7FE10yO_gcW+zQCHNFhRA_NDiktf3UR65BHdw@mail.gmail.com
Diffstat (limited to 'src')
-rw-r--r--src/bin/pg_upgrade/pg_upgrade.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/bin/pg_upgrade/pg_upgrade.c b/src/bin/pg_upgrade/pg_upgrade.c
index 5154a7160d2..403f709afda 100644
--- a/src/bin/pg_upgrade/pg_upgrade.c
+++ b/src/bin/pg_upgrade/pg_upgrade.c
@@ -341,10 +341,9 @@ create_new_objects(void)
snprintf(log_file_name, sizeof(log_file_name), DB_DUMP_LOG_FILE_MASK, old_db->db_oid);
/*
- * template1 and postgres databases will already exist in the target
- * installation, so tell pg_restore to drop and recreate them;
- * otherwise we would fail to propagate their database-level
- * properties.
+ * template1 database will already exist in the target installation,
+ * so tell pg_restore to drop and recreate it; otherwise we would fail
+ * to propagate its database-level properties.
*/
create_opts = "--clean --create";
@@ -378,10 +377,9 @@ create_new_objects(void)
snprintf(log_file_name, sizeof(log_file_name), DB_DUMP_LOG_FILE_MASK, old_db->db_oid);
/*
- * template1 and postgres databases will already exist in the target
- * installation, so tell pg_restore to drop and recreate them;
- * otherwise we would fail to propagate their database-level
- * properties.
+ * postgres database will already exist in the target installation, so
+ * tell pg_restore to drop and recreate it; otherwise we would fail to
+ * propagate its database-level properties.
*/
if (strcmp(old_db->db_name, "postgres") == 0)
create_opts = "--clean --create";