提交 ef42c891 编写于 作者: A Adam Berlin 提交者: Adam Berlin

fixup! Skip attempts to create target gp tablespace.

上级 4700ab98
......@@ -1169,22 +1169,22 @@ ReceiveAndUnpackTarFile(PGconn *conn, PGresult *res, int rownum)
strlcpy(current_path, basedir, sizeof(current_path));
else
{
/*
* Reconstruct the current path replacing the source tablespace path's
* dbid with the dbid provided from --target-gp-dbid option.
*/
strlcpy(current_path, get_tablespace_mapping(PQgetvalue(res, rownum, 1)), sizeof(current_path));
snprintf(gp_tablespace_filename, sizeof(filename), "%s/%s_db%d",
current_path,
GP_TABLESPACE_VERSION_DIRECTORY,
target_gp_dbid);
if (target_gp_dbid < 1)
{
fprintf(stderr, _("%s: cannot restore user-defined tablespaces without the --target-gp-dbid option\n"),
progname);
disconnect_and_exit(1);
}
/*
* Construct the new tablespace path using the given target gp dbid
*/
snprintf(gp_tablespace_filename, sizeof(filename), "%s/%s_db%d",
current_path,
GP_TABLESPACE_VERSION_DIRECTORY,
target_gp_dbid);
}
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册