aboutsummaryrefslogtreecommitdiff
path: root/src/bin/pg_upgrade/option.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/pg_upgrade/option.c')
-rw-r--r--src/bin/pg_upgrade/option.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/bin/pg_upgrade/option.c b/src/bin/pg_upgrade/option.c
index 188dd8d8a8b..7fd7f1d33fc 100644
--- a/src/bin/pg_upgrade/option.c
+++ b/src/bin/pg_upgrade/option.c
@@ -62,6 +62,7 @@ parseCommandLine(int argc, char *argv[])
{"sync-method", required_argument, NULL, 4},
{"no-statistics", no_argument, NULL, 5},
{"set-char-signedness", required_argument, NULL, 6},
+ {"swap", no_argument, NULL, 7},
{NULL, 0, NULL, 0}
};
@@ -228,6 +229,11 @@ parseCommandLine(int argc, char *argv[])
else
pg_fatal("invalid argument for option %s", "--set-char-signedness");
break;
+
+ case 7:
+ user_opts.transfer_mode = TRANSFER_MODE_SWAP;
+ break;
+
default:
fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
os_info.progname);
@@ -325,6 +331,7 @@ usage(void)
printf(_(" --no-statistics do not import statistics from old cluster\n"));
printf(_(" --set-char-signedness=OPTION set new cluster char signedness to \"signed\" or\n"
" \"unsigned\"\n"));
+ printf(_(" --swap move data directories to new cluster\n"));
printf(_(" --sync-method=METHOD set method for syncing files to disk\n"));
printf(_(" -?, --help show this help, then exit\n"));
printf(_("\n"