mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-26 08:36:30 +00:00
10
repmgr.c
10
repmgr.c
@@ -222,12 +222,12 @@ main(int argc, char **argv)
|
|||||||
{"log-level", required_argument, NULL, 'L'},
|
{"log-level", required_argument, NULL, 'L'},
|
||||||
{"terse", no_argument, NULL, 't'},
|
{"terse", no_argument, NULL, 't'},
|
||||||
{"mode", required_argument, NULL, 'm'},
|
{"mode", required_argument, NULL, 'm'},
|
||||||
|
{"pwprompt", no_argument, NULL, 'P'},
|
||||||
{"remote-config-file", required_argument, NULL, 'C'},
|
{"remote-config-file", required_argument, NULL, 'C'},
|
||||||
{"help", no_argument, NULL, OPT_HELP},
|
{"help", no_argument, NULL, OPT_HELP},
|
||||||
{"check-upstream-config", no_argument, NULL, OPT_CHECK_UPSTREAM_CONFIG},
|
{"check-upstream-config", no_argument, NULL, OPT_CHECK_UPSTREAM_CONFIG},
|
||||||
{"recovery-min-apply-delay", required_argument, NULL, OPT_RECOVERY_MIN_APPLY_DELAY},
|
{"recovery-min-apply-delay", required_argument, NULL, OPT_RECOVERY_MIN_APPLY_DELAY},
|
||||||
{"pg_rewind", optional_argument, NULL, OPT_PG_REWIND},
|
{"pg_rewind", optional_argument, NULL, OPT_PG_REWIND},
|
||||||
{"pwprompt", optional_argument, NULL, OPT_PWPROMPT},
|
|
||||||
{"csv", no_argument, NULL, OPT_CSV},
|
{"csv", no_argument, NULL, OPT_CSV},
|
||||||
{"node", required_argument, NULL, OPT_NODE},
|
{"node", required_argument, NULL, OPT_NODE},
|
||||||
{"without-barman", no_argument, NULL, OPT_WITHOUT_BARMAN},
|
{"without-barman", no_argument, NULL, OPT_WITHOUT_BARMAN},
|
||||||
@@ -338,7 +338,7 @@ main(int argc, char **argv)
|
|||||||
strncpy(runtime_options.dbname, runtime_options.username, MAXLEN);
|
strncpy(runtime_options.dbname, runtime_options.username, MAXLEN);
|
||||||
}
|
}
|
||||||
|
|
||||||
while ((c = getopt_long(argc, argv, "?Vd:h:p:U:S:D:f:R:w:k:FWIvb:rcL:tm:C:l:", long_options,
|
while ((c = getopt_long(argc, argv, "?Vd:h:p:U:S:D:f:R:w:k:FWIvb:rcL:tm:C:l:P", long_options,
|
||||||
&optindex)) != -1)
|
&optindex)) != -1)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
@@ -464,6 +464,9 @@ main(int argc, char **argv)
|
|||||||
case 'C':
|
case 'C':
|
||||||
strncpy(runtime_options.remote_config_file, optarg, MAXLEN);
|
strncpy(runtime_options.remote_config_file, optarg, MAXLEN);
|
||||||
break;
|
break;
|
||||||
|
case 'P':
|
||||||
|
runtime_options.witness_pwprompt = true;
|
||||||
|
break;
|
||||||
case OPT_CHECK_UPSTREAM_CONFIG:
|
case OPT_CHECK_UPSTREAM_CONFIG:
|
||||||
check_upstream_config = true;
|
check_upstream_config = true;
|
||||||
break;
|
break;
|
||||||
@@ -514,9 +517,6 @@ main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
runtime_options.pg_rewind_supplied = true;
|
runtime_options.pg_rewind_supplied = true;
|
||||||
break;
|
break;
|
||||||
case OPT_PWPROMPT:
|
|
||||||
runtime_options.witness_pwprompt = true;
|
|
||||||
break;
|
|
||||||
case OPT_CSV:
|
case OPT_CSV:
|
||||||
runtime_options.csv_mode = true;
|
runtime_options.csv_mode = true;
|
||||||
break;
|
break;
|
||||||
|
|||||||
1
repmgr.h
1
repmgr.h
@@ -55,7 +55,6 @@
|
|||||||
#define OPT_COPY_EXTERNAL_CONFIG_FILES 4
|
#define OPT_COPY_EXTERNAL_CONFIG_FILES 4
|
||||||
#define OPT_CONFIG_ARCHIVE_DIR 5
|
#define OPT_CONFIG_ARCHIVE_DIR 5
|
||||||
#define OPT_PG_REWIND 6
|
#define OPT_PG_REWIND 6
|
||||||
#define OPT_PWPROMPT 7
|
|
||||||
#define OPT_CSV 8
|
#define OPT_CSV 8
|
||||||
#define OPT_NODE 9
|
#define OPT_NODE 9
|
||||||
#define OPT_WITHOUT_BARMAN 10
|
#define OPT_WITHOUT_BARMAN 10
|
||||||
|
|||||||
Reference in New Issue
Block a user