Search Postgresql Archives

Re: mount -o async - is it safe?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jan 19, 2006 at 09:42:59AM +0000, Shane Wright wrote:
> Now my question is this; the provider has, by default, mounted it with -o
> sync; so all reads/writes are synchronous.  This doesn't result in the
> greatest of performance, and indeed remounting -o async is significantly
> faster.
> 
> They tell me this is so mySQL databases don't get corrupted in the event of
> a crash.  which is fine...
> 
> But as Postgres uses fsync() to force committed transactions to disk, then
> this shouldn't be necessary, right?

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

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.

Have a nice day,
-- 
Martijn van Oosterhout   <kleptog@xxxxxxxxx>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

Attachment: signature.asc
Description: Digital signature


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux