Initial code for standby clone

This commit is contained in:
Ian Barwick
2017-04-27 09:22:09 +09:00
parent bcf55b4f72
commit 99e7bb0ea3
6 changed files with 188 additions and 30 deletions

View File

@@ -28,6 +28,8 @@ typedef struct
bool verbose;
/* connection options */
char host[MAXLEN];
char remote_user[MAXLEN];
char superuser[MAXLEN];
/* node options */
@@ -35,6 +37,10 @@ typedef struct
char node_name[MAXLEN];
char data_dir[MAXPGPATH];
/* standby clone options */
bool rsync_only;
bool without_barman;
/* event options */
char event[MAXLEN];
int limit;
@@ -42,12 +48,32 @@ typedef struct
} t_runtime_options;
#define T_RUNTIME_OPTIONS_INITIALIZER { \
/* configuration metadata */ \
false, false, false, false, \
/* general configuration options */ \
"", false, "", \
/* logging options */ \
"", false, false, false, \
/* connection options */ \
"", "", "", \
/* node options */ \
UNKNOWN_NODE_ID, "", "", \
/* standby clone options */ \
false, false, \
/* event options */ \
"", 20, false}
/* global configuration structures */
extern t_runtime_options runtime_options;
extern t_configuration_options config_file_options;
t_conninfo_param_list source_conninfo;
extern bool config_file_required;
extern bool config_file_required;
extern char pg_bindir[MAXLEN];
extern char repmgr_slot_name[MAXLEN];
@@ -58,5 +84,7 @@ extern t_node_info target_node_info;
extern int check_server_version(PGconn *conn, char *server_type, bool exit_on_error, char *server_version_string);
extern bool create_repmgr_extension(PGconn *conn);
extern int test_ssh_connection(char *host, char *remote_user);
#endif