Re: BUG #6372: Error while creating database with fsync parameter as on incase of CIFS - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #6372: Error while creating database with fsync parameter as on incase of CIFS
Date
Msg-id 1660.1325536622@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #6372: Error while creating database with fsync parameter as on incase of CIFS  (Magnus Hagander <magnus@hagander.net>)
List pgsql-bugs
Magnus Hagander <magnus@hagander.net> writes:
> On Mon, Jan 2, 2012 at 21:28, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> 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.

> Agreed. But do we really want to accept this with fsync=on? It
> basically means fsync=maybe, no?

Well, given the number of cases that the code already ignores when
isdir is true, I don't think that argument holds much water at all.

However, I'm not real eager to change this just on the basis of the CIFS
case.  If we find another filesystem that returns the same errno,
though, I would vote to change it.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: BUG #6372: Error while creating database with fsync parameter as on incase of CIFS
Next
From: Alvaro Herrera
Date:
Subject: Re: BUG #6372: Error while creating database with fsync parameter as on incase of CIFS