Parse the contents of the "pg_basebackup_options" parameter in repmgr.conf

This is to ensure that when repmgr executes pg_basebackup it doesn't
add any options which would conflict with user-supplied options.

This is related to GitHub #206, where the -S/--slot option has been
added for 9.6 - it's important to check this doesn't conflict with
-X/--xlog-method.

While we're at it, rename the ErrorList handling code to ItemList
etc. so we can use it for generic non-error-related lists.
This commit is contained in:
Ian Barwick
2016-07-26 16:12:43 +09:00
parent 36eb26f86d
commit 02668ee045
7 changed files with 207 additions and 98 deletions

View File

@@ -52,7 +52,6 @@
/* Run time options type */
typedef struct
{
char dbname[MAXLEN];
char host[MAXLEN];
char username[MAXLEN];
@@ -110,7 +109,13 @@ struct BackupLabel
XLogRecPtr min_failover_slot_lsn;
};
extern char repmgr_schema[MAXLEN];
extern bool config_file_found;
typedef struct
{
char slot[MAXLEN];
char xlog_method[MAXLEN];
} t_basebackup_options;
#define T_BASEBACKUP_OPTIONS_INITIALIZER { "", "" }
#endif