mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-26 00:26:30 +00:00
Add option "--dump-config"
This is initially intended for verifying the configuration parsing mechanism and is currently undocumented.
This commit is contained in:
@@ -277,6 +277,11 @@ main(int argc, char **argv)
|
||||
runtime_options.detail = true;
|
||||
break;
|
||||
|
||||
/* --dump-config */
|
||||
case OPT_DUMP_CONFIG:
|
||||
runtime_options.dump_config = true;
|
||||
break;
|
||||
|
||||
/*----------------------------
|
||||
* database connection options
|
||||
*----------------------------
|
||||
@@ -1081,6 +1086,24 @@ main(int argc, char **argv)
|
||||
runtime_options.terse,
|
||||
argv[0]);
|
||||
|
||||
|
||||
/*
|
||||
* Handle options which must be executed without a repmgr command
|
||||
*/
|
||||
if (runtime_options.dump_config == true)
|
||||
{
|
||||
if (repmgr_command != NULL)
|
||||
{
|
||||
fprintf(stderr,
|
||||
_("--dump-config cannot be used in combination with a repmgr command"));
|
||||
exit(ERR_BAD_CONFIG);
|
||||
}
|
||||
dump_config();
|
||||
exit(SUCCESS);
|
||||
}
|
||||
|
||||
|
||||
|
||||
check_cli_parameters(action);
|
||||
|
||||
/*
|
||||
@@ -1219,8 +1242,6 @@ main(int argc, char **argv)
|
||||
logger_set_level(LOG_ERROR);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Node configuration information is not needed for all actions, with
|
||||
* STANDBY CLONE being the main exception.
|
||||
|
||||
Reference in New Issue
Block a user