do not force the tablespace mapping target directory to be empty

This commit is contained in:
Grigory Smolkin
2020-06-10 20:07:10 +03:00
parent 7bdc682075
commit 20796bcb62
+10 -10
View File
@@ -1242,16 +1242,16 @@ check_tablespace_mapping(pgBackup *backup, bool incremental, bool *tblspaces_are
cell->old_dir); cell->old_dir);
/* For incremental restore, check that new directory is empty */ /* For incremental restore, check that new directory is empty */
if (incremental) // if (incremental)
{ // {
if (!is_absolute_path(cell->new_dir)) // if (!is_absolute_path(cell->new_dir))
elog(ERROR, "tablespace directory is not an absolute path: %s\n", // elog(ERROR, "tablespace directory is not an absolute path: %s\n",
cell->new_dir); // cell->new_dir);
//
if (!dir_is_empty(cell->new_dir, FIO_DB_HOST)) // if (!dir_is_empty(cell->new_dir, FIO_DB_HOST))
elog(ERROR, "restore tablespace destination is not empty: \"%s\"", // elog(ERROR, "restore tablespace destination is not empty: \"%s\"",
cell->new_dir); // cell->new_dir);
} // }
} }
/* 2 - all linked directories must be empty */ /* 2 - all linked directories must be empty */