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:37:02
Message-ID: 1660.1325536622@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:28, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Browse pgsql-bugs by date

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