Tolerate EINVAL when calling fsync() on a directory.

Thomas Munro <tmunro@postgresql.org>

Commit: ede6b19624d1836635d8bd2c8cdc6a694d8ff678
Author: Thomas Munro <tmunro@postgresql.org>
Date: 2019-02-24T11:02:56Z
Releases: 9.4.22
Tolerate EINVAL when calling fsync() on a directory.

Previously, we tolerated EBADF as a way for the operating system to
indicate that it doesn't support fsync() on a directory.  Tolerate
EINVAL too, for older versions of Linux CIFS.

Bug #15636.  Back-patch all the way.

Reported-by: John Klann
Discussion: https://postgr.es/m/15636-d380890dafd78fc6@postgresql.org

Files

PathChange+/−
src/backend/storage/file/fd.c modified +1 −1
src/bin/initdb/initdb.c modified +1 −1

Discussion