Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1T5ovd-0007Mx-PJ for pgsql-bugs@postgresql.org; Mon, 27 Aug 2012 02:19:49 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1T5ovZ-0000vU-Ez for pgsql-bugs@postgresql.org; Mon, 27 Aug 2012 02:19:49 +0000 Received: from bruce by momjian.us with local (Exim 4.72) (envelope-from ) id 1T5ovU-0001Fd-4r; Sun, 26 Aug 2012 22:19:40 -0400 Date: Sun, 26 Aug 2012 22:19:40 -0400 From: Bruce Momjian To: Tom Lane Cc: Alvaro Herrera , Magnus Hagander , anjali_524 , Pg Bugs Subject: Re: BUG #6372: Error while creating database with fsync parameter as on incase of CIFS Message-ID: <20120827021940.GB28780@momjian.us> References: <1149.1325535272@sss.pgh.pa.us> <1476.1325536113@sss.pgh.pa.us> <1325537384-sup-6201@alvh.no-ip.org> <2113.1325538019@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2113.1325538019@sss.pgh.pa.us> User-Agent: Mutt/1.5.20 (2009-06-14) X-Pg-Spam-Score: -2.1 (--) X-Archive-Number: 201208/196 X-Sequence-Number: 33920 On Mon, Jan 2, 2012 at 04:00:19PM -0500, Tom Lane wrote: > Alvaro Herrera writes: > > Excerpts from Tom Lane's message of lun ene 02 17:28:33 -0300 2012: > >> 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. > > > Probably because other filesystems do allow you to fsync directories. > > In fact for some cases they _require_ it ... remember the fiasco when > > MTA writers were told that they needed to fsync their queue dirs in > > order for all queued email to persist? > > Yeah, the long and the short of it is that if the filesystem won't > accept an fsync on a directory, we have to assume that it doesn't need > it and will manage metadata persistence safely without prodding. > > The only real question here is whether an EINVAL could mean something > besides "fsync on directory is not accepted". If there are any > scenarios where it represents a transient/fixable error, then we'd > want to report it. It's far from clear to me that there are any > though. What it could mean in general is not at issue, because we > know the target is a directory that we just created moments before. I assume this never got resolved. Should it be changed to ignore EINVAL? -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + It's impossible for everything to be true. +