> Any theories about what is happening?
Hah --- the AIX failures, at least, are explained at
The fsync or fsync_range subroutine is unsuccessful if one or more of the following are true:
EIO An I/O error occurred while reading from or writing to the file system.
EBADF The FileDescriptor parameter is not a valid file descriptor open for writing.
EINVAL The file is not a regular file.
EINTR The subroutine was interrupted by a signal.
So the problem is that fsync_fname is trying to fsync a file it's opened
O_RDONLY. I don't know whether Windows is similarly picky, but we'll
soon find out.
Now, this doesn't mean that all is fine and dandy. I believe that a
majority of Unixen will reject attempts to open directories for writing,
so this solution puts us even further away from being able to fsync the
directories. I would bet however that the platforms that reject this
are ones that don't need fsync on directories. Maybe we just have to
have two different code paths depending on platform :-(
regards, tom lane
In response to
pgsql-hackers by date
|Next:||From: Bruce Momjian||Date: 2010-02-23 05:43:17|
|Subject: Re: Adding \ev view editor?|
|Previous:||From: Bruce Momjian||Date: 2010-02-23 05:22:03|
|Subject: Re: More robust pg_hba.conf parsing/error logging|
pgsql-committers by date
|Next:||From: Tom Lane||Date: 2010-02-23 05:44:55|
|Subject: pgsql: Some platforms reject fsync() on files opened O_RDONLY.|
|Previous:||From: Bruce Momjian||Date: 2010-02-23 05:17:33|
|Subject: pgsql: Make documentation more direct about the handling of COPY files |