From a69176fc1b69367e3e49d3934bc35d7897c5d873 Mon Sep 17 00:00:00 2001 From: Ian Barwick Date: Sat, 28 Feb 2015 11:03:03 +0900 Subject: [PATCH] tablespace_dirs -> tablespace_mapping For consistency with the parameter name. --- config.c | 12 ++++++------ config.h | 2 +- repmgr.c | 8 ++++---- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/config.c b/config.c index 772fbe1b..90c527ab 100644 --- a/config.c +++ b/config.c @@ -71,8 +71,8 @@ parse_config(const char *config_file, t_configuration_options * options) options->monitor_interval_secs = 2; options->retry_promote_interval_secs = 300; - options->tablespace_dirs.head = NULL; - options->tablespace_dirs.tail = NULL; + options->tablespace_mapping.head = NULL; + options->tablespace_mapping.tail = NULL; /* * Since some commands don't require a config file at all, not having one @@ -544,10 +544,10 @@ tablespace_list_append(t_configuration_options *options, const char *arg) canonicalize_path(cell->old_dir); canonicalize_path(cell->new_dir); - if (options->tablespace_dirs.tail) - options->tablespace_dirs.tail->next = cell; + if (options->tablespace_mapping.tail) + options->tablespace_mapping.tail->next = cell; else - options->tablespace_dirs.head = cell; + options->tablespace_mapping.head = cell; - options->tablespace_dirs.tail = cell; + options->tablespace_mapping.tail = cell; } diff --git a/config.h b/config.h index c9c61306..8a434229 100644 --- a/config.h +++ b/config.h @@ -61,7 +61,7 @@ typedef struct int monitor_interval_secs; int retry_promote_interval_secs; int use_replication_slots; - TablespaceList tablespace_dirs; + TablespaceList tablespace_mapping; } t_configuration_options; #define T_CONFIGURATION_OPTIONS_INITIALIZER { "", -1, NO_UPSTREAM_NODE, "", MANUAL_FAILOVER, -1, "", "", "", "", "", "", "", -1, -1, -1, "", "", "", "", 0, 0, 0, {NULL, NULL} } diff --git a/repmgr.c b/repmgr.c index 8303314c..95f9b443 100644 --- a/repmgr.c +++ b/repmgr.c @@ -951,7 +951,7 @@ do_standby_clone(void) * currently we can't handle that and will fail with an error */ - if(options.tablespace_dirs.head != NULL) + if(options.tablespace_mapping.head != NULL) { if(get_server_version(primary_conn, NULL) < 90400) { @@ -961,7 +961,7 @@ do_standby_clone(void) exit(ERR_BAD_CONFIG); } - for (cell = options.tablespace_dirs.head; cell; cell = cell->next) + for (cell = options.tablespace_mapping.head; cell; cell = cell->next) { sqlquery_snprintf(sqlquery, @@ -2160,9 +2160,9 @@ run_basebackup() if(strlen(runtime_options.dest_dir)) appendPQExpBuffer(¶ms, " -D %s", runtime_options.dest_dir); - if(options.tablespace_dirs.head != NULL) + if(options.tablespace_mapping.head != NULL) { - for (cell = options.tablespace_dirs.head; cell; cell = cell->next) + for (cell = options.tablespace_mapping.head; cell; cell = cell->next) { appendPQExpBuffer(¶ms, " -T %s=%s", cell->old_dir, cell->new_dir); }