pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@commandprompt.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Magnus Hagander <magnus@hagander.net>
Cc: anjali_524 <anjali_524@yahoo.co.in>
Cc: Pg Bugs <pgsql-bugs@postgresql.org>
Subject: Re: BUG #6372: Error while creating database with fsync parameter as on incase of CIFS
Date: Mon, 02 Jan 2012 17:53:08 -0300
Message-ID: <1325537384-sup-6201@alvh.no-ip.org> (raw)
In-Reply-To: <1476.1325536113@sss.pgh.pa.us>
References: <E1RhkjA-0005bq-B6@wrigleys.postgresql.org>
	<CABUevEzRd6TT89dx5AG_ceLgrvg7KTpCFmM8=iKvVL-HRHoM6w@mail.gmail.com>
	<1149.1325535272@sss.pgh.pa.us>
	<CABUevEww2AKdVqU3n8wi-zpSsqVPKn8xxCk4io3nzv6O7UZMqQ@mail.gmail.com>
	<1476.1325536113@sss.pgh.pa.us>


Excerpts from Tom Lane's message of lun ene 02 17:28:33 -0300 2012:

> 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.

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?

-- 
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support



view thread (12+ messages)  latest in thread

Message-ID: <1325537384-sup-6201@alvh.no-ip.org>
Permalink:  ../1325537384-sup-6201@alvh.no-ip.org/
Also on:    postgresql.org/message-id/1325537384-sup-6201@alvh.no-ip.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: alvherre@commandprompt.com, tgl@sss.pgh.pa.us, magnus@hagander.net, anjali_524@yahoo.co.in
  Subject: Re: BUG #6372: Error while creating database with fsync parameter as on incase of CIFS
  In-Reply-To: <1325537384-sup-6201@alvh.no-ip.org>
  References: <E1RhkjA-0005bq-B6@wrigleys.postgresql.org> <CABUevEzRd6TT89dx5AG_ceLgrvg7KTpCFmM8=iKvVL-HRHoM6w@mail.gmail.com> <1149.1325535272@sss.pgh.pa.us> <CABUevEww2AKdVqU3n8wi-zpSsqVPKn8xxCk4io3nzv6O7UZMqQ@mail.gmail.com> <1476.1325536113@sss.pgh.pa.us> <1325537384-sup-6201@alvh.no-ip.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox