From: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
---|---|
To: | Shane Wright <shane(dot)wright(at)edigitalresearch(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: mount -o async - is it safe? |
Date: | 2006-01-19 09:58:44 |
Message-ID: | 20060119095844.GE9949@svana.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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(at)svana(dot)org> 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.
From | Date | Subject | |
---|---|---|---|
Next Message | bgolda | 2006-01-19 10:05:41 | Isolation level in a function |
Previous Message | Shane Wright | 2006-01-19 09:42:59 | mount -o async - is it safe? |