mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-26 00:26:30 +00:00
Add configuration file parameter for pg_basebackup
"pg_basebackup_options" Enable custom options to be passed to pg_basebackup (e.g. --max-rate, --checkpoint, --xlogdir) "tablespace_mapping" Analogue to pg_basebackup's (9.4 and later) -T/--tablespace-mapping option. Tablespace mapping could also be passed via "pg_basebackup_options", however by providing a separate parameter it makes the configuration file easier to read and allows us to verify the specified tablespaces exist (pg_basebackup won't do this, which can lead to undesired behaviour, i.e. attempting to create the tablespace in the original path).
This commit is contained in:
15
config.h
15
config.h
@@ -23,7 +23,18 @@
|
||||
#include "repmgr.h"
|
||||
#include "strutil.h"
|
||||
|
||||
typedef struct TablespaceListCell
|
||||
{
|
||||
struct TablespaceListCell *next;
|
||||
char old_dir[MAXPGPATH];
|
||||
char new_dir[MAXPGPATH];
|
||||
} TablespaceListCell;
|
||||
|
||||
typedef struct TablespaceList
|
||||
{
|
||||
TablespaceListCell *head;
|
||||
TablespaceListCell *tail;
|
||||
} TablespaceList;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
@@ -45,13 +56,15 @@ typedef struct
|
||||
int reconnect_intvl;
|
||||
char pg_bindir[MAXLEN];
|
||||
char pgctl_options[MAXLEN];
|
||||
char pg_basebackup_options[MAXLEN];
|
||||
char logfile[MAXLEN];
|
||||
int monitor_interval_secs;
|
||||
int retry_promote_interval_secs;
|
||||
int use_replication_slots;
|
||||
TablespaceList tablespace_dirs;
|
||||
} t_configuration_options;
|
||||
|
||||
#define T_CONFIGURATION_OPTIONS_INITIALIZER { "", -1, NO_UPSTREAM_NODE, "", MANUAL_FAILOVER, -1, "", "", "", "", "", "", "", -1, -1, -1, "", "", "", 0, 0, 0 }
|
||||
#define T_CONFIGURATION_OPTIONS_INITIALIZER { "", -1, NO_UPSTREAM_NODE, "", MANUAL_FAILOVER, -1, "", "", "", "", "", "", "", -1, -1, -1, "", "", "", "", 0, 0, 0, {NULL, NULL} }
|
||||
|
||||
|
||||
void parse_config(const char *config_file, t_configuration_options * options);
|
||||
|
||||
Reference in New Issue
Block a user