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

From Pól Ua Laoínecháin
Subject Re: PostgreSQL, Asynchronous I/O, Buffered I/O and why did fsync-gate not affect Oracle or MySQL?
Date
Msg-id CAF4RT5ThNLujBiDk4G+45nUiXVTZ+boVv5gGb+5G+UyTXMt_Yg@mail.gmail.com
Whole thread Raw
In response to Re: PostgreSQL, Asynchronous I/O, Buffered I/O and why did fsync-gate not affect Oracle or MySQL?  ("Peter J. Holzer" <hjp-pgsql@hjp.at>)
List 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



pgsql-general by date:

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