summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/backend/storage/file/fd.c2
-rw-r--r--src/bin/initdb/initdb.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/storage/file/fd.c b/src/backend/storage/file/fd.c
index 757aa083a0c..6d016a79e93 100644
--- a/src/backend/storage/file/fd.c
+++ b/src/backend/storage/file/fd.c
@@ -3167,7 +3167,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/bin/initdb/initdb.c b/src/bin/initdb/initdb.c
index d303ebb98b5..dba438f782a 100644
--- a/src/bin/initdb/initdb.c
+++ b/src/bin/initdb/initdb.c
@@ -699,7 +699,7 @@ fsync_fname_ext(const char *fname, bool isdir)
* 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));