aboutsummaryrefslogtreecommitdiff
path: root/src/bin/pg_upgrade/controldata.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/pg_upgrade/controldata.c')
-rw-r--r--src/bin/pg_upgrade/controldata.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/bin/pg_upgrade/controldata.c b/src/bin/pg_upgrade/controldata.c
index bd49ea867bf..47ee27ec835 100644
--- a/src/bin/pg_upgrade/controldata.c
+++ b/src/bin/pg_upgrade/controldata.c
@@ -751,7 +751,7 @@ check_control_data(ControlData *oldctrl,
void
-disable_old_cluster(void)
+disable_old_cluster(transferMode transfer_mode)
{
char old_path[MAXPGPATH],
new_path[MAXPGPATH];
@@ -766,10 +766,17 @@ disable_old_cluster(void)
old_path, new_path);
check_ok();
- pg_log(PG_REPORT, "\n"
- "If you want to start the old cluster, you will need to remove\n"
- "the \".old\" suffix from %s/global/pg_control.old.\n"
- "Because \"link\" mode was used, the old cluster cannot be safely\n"
- "started once the new cluster has been started.",
- old_cluster.pgdata);
+ if (transfer_mode == TRANSFER_MODE_LINK)
+ pg_log(PG_REPORT, "\n"
+ "If you want to start the old cluster, you will need to remove\n"
+ "the \".old\" suffix from %s/global/pg_control.old.\n"
+ "Because \"link\" mode was used, the old cluster cannot be safely\n"
+ "started once the new cluster has been started.",
+ old_cluster.pgdata);
+ else if (transfer_mode == TRANSFER_MODE_SWAP)
+ pg_log(PG_REPORT, "\n"
+ "Because \"swap\" mode was used, the old cluster can no longer be\n"
+ "safely started.");
+ else
+ pg_fatal("unrecognized transfer mode");
}