tablespace_dirs -> tablespace_mapping

For consistency with the parameter name.
This commit is contained in:
Ian Barwick
2015-02-28 11:03:03 +09:00
parent 65dcce55e8
commit a69176fc1b
3 changed files with 11 additions and 11 deletions

View File

@@ -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;
}

View File

@@ -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} }

View File

@@ -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(&params, " -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(&params, " -T %s=%s", cell->old_dir, cell->new_dir);
}