repmgr: don't error out on superfluous command line options

When parsing command line arguments in check_parameters_for_action(),
create warnings for paramters supplied but not required (e.g. -D/--data-dir
for MASTER REGISTER), rather than fail with error(s), as the
presence of the parameters won't cause any problems.

Errors will still be raised for required-but-missing parameters, of course.
This commit is contained in:
Ian Barwick
2015-11-19 10:19:15 +09:00
parent 869b6a7a06
commit d433982af7
2 changed files with 54 additions and 29 deletions

4
TODO
View File

@@ -60,9 +60,5 @@ Usability improvements
while running a backup, an attempt can be made to execute pg_stop_backup()
on the primary, to prevent an orphaned backup state existing.
* repmgr: when parsing command line arguments in check_parameters_for_action(),
don't error out on parameters which aren't relevant for the particular
action; instead collate into a list of warnings
* repmgr: when unregistering a node, delete any entries in the repl_monitoring
table.