Re: Defaulting wal_sync_method to fdatasync on Linux for 9.1?

Поиск
Список
Период
Сортировка
От Greg Smith
Тема Re: Defaulting wal_sync_method to fdatasync on Linux for 9.1?
Дата
Msg-id 4CCDCAA3.4050805@2ndquadrant.com
обсуждение исходный текст
Ответ на Defaulting wal_sync_method to fdatasync on Linux for 9.1?  (Marti Raudsepp <marti@juffo.org>)
Ответы Re: Defaulting wal_sync_method to fdatasync on Linux for 9.1?  (Andres Freund <andres@anarazel.de>)
Re: Defaulting wal_sync_method to fdatasync on Linux for 9.1?  (Marti Raudsepp <marti@juffo.org>)
Re: Defaulting wal_sync_method to fdatasync on Linux for 9.1?  (Mark Kirkwood <mark.kirkwood@catalyst.net.nz>)
Список pgsql-performance
Marti Raudsepp wrote:
> Unless fdatasync is unsafe, I'd very much want to see it as the
> default for 9.1 on Linux (I don't know about other platforms).  I
> can't see any reasons why each write would need to be sync-ed if I
> don't commit that often. Increasing wal_buffers probably has the same
> effect wrt data safety.
>

Writes only are sync'd out when you do a commit, or the database does a
checkpoint.

This issue is a performance difference introduced by a recent change to
Linux.  open_datasync support was just added to Linux itself very
recently.  It may be more safe than fdatasync on your platform.  As new
code it may have bugs so that it doesn't really work at all under heavy
load.  No one has really run those tests yet.  See
http://wiki.postgresql.org/wiki/Reliable_Writes for some background, and
welcome to the fun of being an early adopter.  The warnings in the
tuning guide are there for a reason--you're in untested territory now.
I haven't finished validating whether I consider 2.6.32 safe for
production use or not yet, and 2.6.36 is a solid year away from being on
my list for even considering it as a production database kernel.  You
should proceed presuming that all writes are unreliable until proven
otherwise.

--
Greg Smith   2ndQuadrant US    greg@2ndQuadrant.com   Baltimore, MD
PostgreSQL Training, Services and Support        www.2ndQuadrant.us
"PostgreSQL 9.0 High Performance": http://www.2ndQuadrant.com/books


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

Предыдущее
От: Marti Raudsepp
Дата:
Сообщение: Defaulting wal_sync_method to fdatasync on Linux for 9.1?
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Defaulting wal_sync_method to fdatasync on Linux for 9.1?