On 4/28/20 10:43 AM, Benjamin Schaller wrote:
for an university project I'm currently doing some research on PostgreSQL. I was wondering if hypothetically it would be possible to implement a raw device system to PostgreSQL. I know that the disadvantages would probably be higher than the advantages compared to working with the file system. Just hypothetically: Would it be possible to change the source code of PostgreSQL so a raw device system could be implemented, or would that cause a chain reaction so that basically one would have to rewrite almost the entire code, because too many elements of PostgreSQL rely on the file system?

It would require quite a bit of work since 1) PostgreSQL stores its data in multiple files and 2) PostgreSQL currently supports only synchronous buffered IO.

To get the performance benefits from using raw devices I think you would want to add support for asynchronous IO to PostgreSQL rather than implementing your own layer to emulate the kernel's buffered IO.

Andres Freund did a talk on aync IO in PostgreSQL earlier this year. It was not recorded but the slides are available.

https://www.postgresql.eu/events/fosdem2020/schedule/session/2959-asynchronous-io-for-postgresql/

Andreas


Reply via email to