Re: PostgreSQL, Asynchronous I/O, Buffered I/O and why did fsync-gate not affect Oracle or MySQL?

From: Pól Ua Laoínecháin <linehanp(at)tcd(dot)ie>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: PostgreSQL, Asynchronous I/O, Buffered I/O and why did fsync-gate not affect Oracle or MySQL?
Date: 2021-05-04 08:56:04
Message-ID: CAF4RT5ThNLujBiDk4G+45nUiXVTZ+boVv5gGb+5G+UyTXMt_Yg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi Peter, and thanks for your input.

> > Now, I'm not quite sure that I completely comprehend matters: Is there
> > a difference between Asynchronous I/O and Buffered I/O?

> Buffered I/O... <explanation snipped>

So, with buffered I/O, I might write something to the db (with a
commit) and would get a "yes, written" response (almost instantanous),
even though the data hadn't actually touched the disk?

And any subsequent (independent - separate user) read request will see
that data as having been "written" even though it hasn't actually
reached the disk yet? It would do this, because read requests would
first look through buffers before actually checking the disk?

> Asynchronous I/O refers to a different programming model: Any read or
> write request only initiates the data transfer and returns immediately.
> The application will later be notified when the request is finished.
> This is very different from the traditional (in Unix) synchronous
> programming model where a read would block until the data was actually
> available and a write would block until the data was safely transferred
> to the OS's buffer cache (and can be overwritten by the application).

So, any separate read would see what? What does PostgreSQL do? Or is
this configurable?

Also, how does the WAL fit into all of this?

As I responded to others who have taken the trouble to reply to me -
if you (or anyone) would have some detailed references covering these
issues (either PG specific or generally), I'd be very grateful.

MfG und vielen Dank.

Pól...

> hp

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Pól Ua Laoínecháin 2021-05-04 09:52:09 Re: Is this the future of I/O for the RDBMS?
Previous Message Pól Ua Laoínecháin 2021-05-04 08:41:19 Re: PostgreSQL, Asynchronous I/O, Buffered I/O and why did fsync-gate not affect Oracle or MySQL?