diff options
-rw-r--r-- | src/backend/storage/file/fd.c | 2 | ||||
-rw-r--r-- | src/common/file_utils.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/storage/file/fd.c b/src/backend/storage/file/fd.c index 747eb3c537e..8d2b8aacfeb 100644 --- a/src/backend/storage/file/fd.c +++ b/src/backend/storage/file/fd.c @@ -3538,7 +3538,7 @@ fsync_fname_ext(const char *fname, bool isdir, bool ignore_perm, int elevel) * Some OSes don't allow us to fsync directories at all, so we can ignore * those errors. Anything else needs to be logged. */ - if (returncode != 0 && !(isdir && errno == EBADF)) + if (returncode != 0 && !(isdir && (errno == EBADF || errno == EINVAL))) { int save_errno; diff --git a/src/common/file_utils.c b/src/common/file_utils.c index 48876061c38..af8746fc701 100644 --- a/src/common/file_utils.c +++ b/src/common/file_utils.c @@ -299,7 +299,7 @@ fsync_fname(const char *fname, bool isdir, const char *progname) * Some OSes don't allow us to fsync directories at all, so we can ignore * those errors. Anything else needs to be reported. */ - if (returncode != 0 && !(isdir && errno == EBADF)) + if (returncode != 0 && !(isdir && (errno == EBADF || errno == EINVAL))) { fprintf(stderr, _("%s: could not fsync file \"%s\": %s\n"), progname, fname, strerror(errno)); |