From 1d5f54c5eedefceacd354dea4ea5b82720ffb819 Mon Sep 17 00:00:00 2001 From: Arthur Zakirov Date: Fri, 6 Jul 2018 19:18:05 +0300 Subject: [PATCH] PGPRO-1376: Do not call dir_is_empty() twice, because readdir() may bring different ordering --- src/restore.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/restore.c b/src/restore.c index dc339fd5..a39b5127 100644 --- a/src/restore.c +++ b/src/restore.c @@ -581,14 +581,6 @@ restore_directories(const char *pg_data_dir, const char *backup_dir) linked_path, dir_created, link_name); } - /* - * This check was done in check_tablespace_mapping(). But do - * it again. - */ - if (!dir_is_empty(linked_path)) - elog(ERROR, "restore tablespace destination is not empty: \"%s\"", - linked_path); - if (link_sep) elog(LOG, "create directory \"%s\" and symbolic link \"%.*s\"", linked_path,