Skip to content

Commit 20796bc

Browse files
committed
do not force the tablespace mapping target directory to be empty
1 parent 7bdc682 commit 20796bc

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/dir.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1242,16 +1242,16 @@ check_tablespace_mapping(pgBackup *backup, bool incremental, bool *tblspaces_are
12421242
cell->old_dir);
12431243

12441244
/* For incremental restore, check that new directory is empty */
1245-
if (incremental)
1246-
{
1247-
if (!is_absolute_path(cell->new_dir))
1248-
elog(ERROR, "tablespace directory is not an absolute path: %s\n",
1249-
cell->new_dir);
1250-
1251-
if (!dir_is_empty(cell->new_dir, FIO_DB_HOST))
1252-
elog(ERROR, "restore tablespace destination is not empty: \"%s\"",
1253-
cell->new_dir);
1254-
}
1245+
// if (incremental)
1246+
// {
1247+
// if (!is_absolute_path(cell->new_dir))
1248+
// elog(ERROR, "tablespace directory is not an absolute path: %s\n",
1249+
// cell->new_dir);
1250+
//
1251+
// if (!dir_is_empty(cell->new_dir, FIO_DB_HOST))
1252+
// elog(ERROR, "restore tablespace destination is not empty: \"%s\"",
1253+
// cell->new_dir);
1254+
// }
12551255
}
12561256

12571257
/* 2 - all linked directories must be empty */

0 commit comments

Comments
 (0)