Re: Defaulting wal_sync_method to fdatasync on Linux for 9.1?

Поиск
Список
Период
Сортировка
От Marti Raudsepp
Тема Re: Defaulting wal_sync_method to fdatasync on Linux for 9.1?
Дата
Msg-id AANLkTinEAmKDz7x356bgX=-6x7zpjK3bB0hYAmKvYHB9@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Defaulting wal_sync_method to fdatasync on Linux for 9.1?  (Greg Smith <greg@2ndquadrant.com>)
Ответы Re: Defaulting wal_sync_method to fdatasync on Linux for 9.1?  (Greg Smith <greg@2ndquadrant.com>)
Re: Defaulting wal_sync_method to fdatasync on Linux for 9.1?  (Greg Smith <greg@2ndquadrant.com>)
Список pgsql-performance
On Fri, Nov 5, 2010 at 23:10, Greg Smith <greg@2ndquadrant.com> wrote:
>> Not having a real O_DSYNC on linux until recently makes it even more
>> dubious to have it as a default...
>>
>
> If Linux is now defining O_DSYNC

Well, Linux always defined both O_SYNC and O_DSYNC, but they used to
have the same value. The defaults changed due to an unfortunate
heuristic in PostgreSQL, which boils down to:

#if O_DSYNC != O_SYNC
#define DEFAULT_SYNC_METHOD     SYNC_METHOD_OPEN_DSYNC
#else
#define DEFAULT_SYNC_METHOD     SYNC_METHOD_FDATASYNC

(see src/include/access/xlogdefs.h for details)

In fact, I was wrong in my earlier post. Linux always offered O_DSYNC
behavior. What's new is POSIX-compliant O_SYNC, and the fact that
these flags are now distinguished.

Here's the change in Linux:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6b2f3d1f769be5779b479c37800229d9a4809fc3

Regards,
Marti

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

Предыдущее
От: Greg Smith
Дата:
Сообщение: Re: 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?