Re: mount -o async - is it safe? - Mailing list pgsql-general

From Doug McNaught
Subject Re: mount -o async - is it safe?
Date
Msg-id 87ek34v0r8.fsf@asmodeus.mcnaught.org
Whole thread Raw
In response to Re: mount -o async - is it safe?  (Martijn van Oosterhout <kleptog@svana.org>)
Responses Re: mount -o async - is it safe?
List pgsql-general
Martijn van Oosterhout <kleptog@svana.org> writes:

> That depends. As long as the data is appropriately sync()ed when
> PostgreSQL asks, it should be fine. However, from reading the manpage
> it's not clear if fsync() still works when mounted -o async.
>
> If -o async means "all I/O is asyncronous except stuff explicitly
> fsync()ed" you're fine. Otherwise...

That's the way it works.  Async is the default setting for most
filesystems, but fsync() is always honored, at last as far as
non-lying hardware will allow.  :)

> The usual advice is to stick the WAL on a properly synced partition and
> stick the rest somewhere else. Note, I have no experience with this,
> it's just what I've heard.

This might not be optimal, as having every write synchronous actually
results in more synced writes than are strictly necessary.

-Doug

pgsql-general by date:

Previous
From: Sean Davis
Date:
Subject: Re: Normalized storage to denormalized report
Next
From: Doug McNaught
Date:
Subject: Re: Insert a default timestamp when nothing given