Re: mount -o async - is it safe?

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: mount -o async - is it safe?
Дата
Msg-id 20060119095844.GE9949@svana.org
обсуждение исходный текст
Ответ на mount -o async - is it safe?  (Shane Wright <shane.wright@edigitalresearch.com>)
Ответы Re: mount -o async - is it safe?  (Doug McNaught <doug@mcnaught.org>)
Список 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@svana.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.

Вложения

В списке pgsql-general по дате отправления:

Предыдущее
От: Shane Wright
Дата:
Сообщение: mount -o async - is it safe?
Следующее
От: Michelle Konzack
Дата:
Сообщение: tsearch2 and "how to use"