Re: O_DSYNC broken on MacOS X?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: O_DSYNC broken on MacOS X?
Дата
Msg-id 12984.1285880534@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: O_DSYNC broken on MacOS X?  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: O_DSYNC broken on MacOS X?  ("A.M." <agentm@themactionfaction.com>)
Re: O_DSYNC broken on MacOS X?  (Robert Haas <robertmhaas@gmail.com>)
Re: O_DSYNC broken on MacOS X?  (Greg Smith <greg@2ndquadrant.com>)
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> Oh, I missed that.  Actually, I wasn't really so concerned with
> whether his benchmark is correct.  I *am* concerned about being broken
> out of the box on MacOS X.

Actually, the problem with OSX is that OSX is broken out of the box,
at least by that standard.  The system's normal configuration is that
fsync() does nothing, so it's hardly surprising that O_DSYNC is no
better.  You have to use wal_sync_method = fsync_writethrough to get
actual bits-to-the-platter behavior.

I'm not sure whether we should select fsync_writethrough as the default
on OSX.  We don't make an equivalent attempt to prevent OS or storage
malfeasance on other Unixoid platforms --- in fact, I'd say OSX is a bit
ahead of the game in that you *can* force writethrough without resorting
to arcane hacks with hdparm or some such.

We could definitely stand to be a bit more verbose about documenting
the platform-specific issues in this area.
        regards, tom lane


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Postgres vs. intel ccNUMA on Linux
Следующее
От: "A.M."
Дата:
Сообщение: Re: O_DSYNC broken on MacOS X?