Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 316051715CA for ; Mon, 2 Jan 2012 16:37:17 -0400 (AST) Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Rhod9-0007N0-Ko for pgsql-bugs@postgresql.org; Mon, 02 Jan 2012 20:37:17 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id q02Kb2CZ001661; Mon, 2 Jan 2012 15:37:02 -0500 (EST) To: Magnus Hagander cc: anjali_524@yahoo.co.in, pgsql-bugs@postgresql.org Subject: Re: BUG #6372: Error while creating database with fsync parameter as on incase of CIFS In-reply-to: References: <1149.1325535272@sss.pgh.pa.us> <1476.1325536113@sss.pgh.pa.us> Comments: In-reply-to Magnus Hagander message dated "Mon, 02 Jan 2012 21:30:19 +0100" Date: Mon, 02 Jan 2012 15:37:02 -0500 Message-ID: <1660.1325536622@sss.pgh.pa.us> From: Tom Lane X-Pg-Spam-Score: -3.2 (---) X-Archive-Number: 201201/10 X-Sequence-Number: 32077 Magnus Hagander writes: > On Mon, Jan 2, 2012 at 21:28, Tom Lane 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