Don't error for ENOENT in CitusRemoveDirectory.

For concurrency reasons, this can happen even if initial stat succeeded.
pull/3421/head
Hadi Moshayedi 2020-01-23 09:58:57 -08:00
parent 4fbf9a290a
commit 1dc19215eb
1 changed files with 1 additions and 1 deletions

View File

@ -783,7 +783,7 @@ CitusRemoveDirectory(StringInfo filename)
removed = unlink(filename->data); removed = unlink(filename->data);
} }
if (removed != 0) if (removed != 0 && errno != ENOENT)
{ {
ereport(ERROR, (errcode_for_file_access(), ereport(ERROR, (errcode_for_file_access(),
errmsg("could not remove file \"%s\": %m", filename->data))); errmsg("could not remove file \"%s\": %m", filename->data)));