Re: BUG #6372: Error while creating database with fsync parameter as on incase of CIFS

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: anjali_524(at)yahoo(dot)co(dot)in, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #6372: Error while creating database with fsync parameter as on incase of CIFS
Date: 2012-01-02 20:28:33
Message-ID: 1476.1325536113@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Magnus Hagander <magnus(at)hagander(dot)net> writes:
> On Mon, Jan 2, 2012 at 21:14, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> I'm wondering what's your basis for asserting we don't support CIFS in
>> general? It's probably not terribly bulletproof, but any worse than NFS?

> Yes, it is a lot worse than NFS from experience. I can't find a
> reference to it anywhere now, but IIRC there are bigger issues - with
> blocksizes, with syncing not properly, with write ordering.

Hmm. I searched the list archives and couldn't find any previous
discussion of such things, but that may just prove that no one thinks
it's worth attempting.

Anyway the immediate question is which errnos are reasonable for copydir
to ignore. Just looking at the standard's description of fsync's error
conditions:

The fsync() function shall fail if:
[EBADF]
The fildes argument is not a valid descriptor.
[EINTR]
The fsync() function was interrupted by a signal.
[EINVAL]
The fildes argument does not refer to a file on which this operation is possible.
[EIO]
An I/O error occurred while reading from or writing to the file system.

it seems like EINVAL is a considerably more reasonable thing to return
than EBADF, if the filesystem is trying to tell you that it won't fsync
a directory. So I'm a bit surprised this question hasn't come up for
other filesystems.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Magnus Hagander 2012-01-02 20:30:19 Re: BUG #6372: Error while creating database with fsync parameter as on incase of CIFS
Previous Message Magnus Hagander 2012-01-02 20:18:27 Re: BUG #6372: Error while creating database with fsync parameter as on incase of CIFS