On 4 April 2018 at 05:47, Robert Haas <robertmh...@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? -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services