"standby clone": skip tablespace mapping in PostgreSQL 9.3

This commit is contained in:
Ian Barwick
2017-09-18 13:26:35 +09:00
parent 30b11c08e6
commit 1197c11c59

View File

@@ -3619,6 +3619,12 @@ initialise_direct_clone(t_node_info *node_record)
*/
if (config_file_options.tablespace_mapping.head != NULL)
{
if (server_version_num < 90400)
{
log_error(_("tablespace mapping not supported in PostgreSQL 9.3, ignoring"));
}
else
{
TablespaceListCell *cell = false;
KeyValueList not_found = {NULL, NULL};
@@ -3626,6 +3632,7 @@ initialise_direct_clone(t_node_info *node_record)
matched = 0;
bool success = false;
for (cell = config_file_options.tablespace_mapping.head; cell; cell = cell->next)
{
char *old_dir_escaped = escape_string(source_conn, cell->old_dir);
@@ -3640,8 +3647,7 @@ initialise_direct_clone(t_node_info *node_record)
}
else
{
key_value_list_set(
&not_found,
key_value_list_set(&not_found,
cell->old_dir,
"");
}
@@ -3673,6 +3679,7 @@ initialise_direct_clone(t_node_info *node_record)
exit(ERR_BAD_CONFIG);
}
}
}
/*
* If replication slots requested, create appropriate slot on the source