Re: Raw device on PostgreSQL

From: Andreas Karlsson <andreas(at)proxel(dot)se>
To: Benjamin Schaller <benjamin(dot)schaller(at)s2018(dot)tu-chemnitz(dot)de>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Raw device on PostgreSQL
Date: 2020-04-28 12:10:51
Message-ID: ff91bc22-2816-0137-7909-2c680d636099@proxel.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Lőrinc Pap 2020-04-28 12:13:47 Re: Binary COPY IN size reduction
Previous Message Stephen Frost 2020-04-28 12:01:30 Re: Raw device on PostgreSQL