On Wed, Apr 11, 2018 at 07:32:21PM -0700, Andres Freund wrote: > > Most of that sounds like a good thing to do, but you got to recognize > that that's a lot of linux specific code. I know it's not what PG has chosen, but realistically all of the other major databases and userspace based storage systems have used DIO precisely *because* it's the way to avoid OS-specific behavior or require OS-specific code. DIO is simple, and pretty much the same everywhere. In contrast, the exact details of how buffered I/O workrs can be quite different on different OS's. This is especially true if you take performance related details (e.g., the cleaning algorithm, how pages get chosen for eviction, etc.) As I read the PG-hackers thread, I thought I saw acknowledgement that some of the behaviors you don't like with Linux also show up on other Unix or Unix-like systems? - Ted