Re: We really ought to do something about O_DIRECT and data=journalled on ext4
От | Marti Raudsepp |
---|---|
Тема | Re: We really ought to do something about O_DIRECT and data=journalled on ext4 |
Дата | |
Msg-id | AANLkTin4vUCB9Ssb6Ywi80_fHR8dLPz=PqsS72aEjp05@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: We really ought to do something about O_DIRECT and data=journalled on ext4 (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: We really ought to do something about O_DIRECT and data=journalled on ext4
|
Список | pgsql-hackers |
On Tue, Dec 7, 2010 at 03:34, Tom Lane <tgl@sss.pgh.pa.us> wrote: > To my mind, O_DIRECT is not really the key issue here, it's whether to > prefer O_DSYNC or fdatasync. Since different platforms implement these primitives differently, and it's not always clear from the header file definitions which options are actually implemented, how about simply hard-coding a default value for each platform? 1. This would be quite straightforward to code and document (a table of platforms and their default wal_sync_method setting) 2. The best performing (or safest) method can be chosen on every platform. From the above discussion it seems that Windows and OSX should default to fdatasync_writethrough even if other methods are available 3. It would pre-empt similar surprises if other platforms change their header files, like what happened on Linux now. Sounds like the simple and foolproof solution. Regards, Marti
В списке pgsql-hackers по дате отправления: