Re: PostgreSQL's handling of fsync() errors is unsafe and risks data loss at least on XFS
От | Craig Ringer |
---|---|
Тема | Re: PostgreSQL's handling of fsync() errors is unsafe and risks data loss at least on XFS |
Дата | |
Msg-id | CAMsr+YFdyknZQhV4Xj5hpAjBqtWw5p-hnJuSbvJ+eB4GF8L8MQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: PostgreSQL's handling of fsync() errors is unsafe and risks data loss at least on XFS (Robert Haas <robertmhaas@gmail.com>) |
Ответы |
Re: PostgreSQL's handling of fsync() errors is unsafe and risks data loss at least on XFS
|
Список | pgsql-hackers |
On 4 April 2018 at 05:47, Robert Haas <robertmhaas@gmail.com> wrote:
Now, I hear the DIRECT_IO thing and I assume we're eventually going to
have to go that way: Linux kernel developers seem to think that "real
men use O_DIRECT" and so if other forms of I/O don't provide useful
guarantees, well that's our fault for not using O_DIRECT. That's a
political reason, not a technical reason, but it's a reason all the
same.
I looked into buffered AIO a while ago, by the way, and just ... hell no. Run, run as fast as you can.
The trouble with direct I/O is that it pushes a _lot_ of work back on PostgreSQL regarding knowledge of the storage subsystem, I/O scheduling, etc. It's absurd to have the kernel do this, unless you want it reliable, in which case you bypass it and drive the hardware directly.
We'd need pools of writer threads to deal with all the blocking I/O. It'd be such a nightmare. Hey, why bother having a kernel at all, except for drivers?
В списке pgsql-hackers по дате отправления: