On Thu, Jan 13, 2011 at 6:55 PM, Dan Birken <bir...@gmail.com> wrote:
> When you begin a transaction, all your changes write to the in-memory WAL
> buffer, and that buffer flushes to disk when:
> a) Somebody commits a synchronous transaction
> b) The WAL buffer runs out of space
> Please correct me if I'm wrong.

I don't think there is an explicit in-memory WAL -- it is just the
file's I/O buffer.  What the commit causes is that disk file to be
flushed to disk using the sync file system call, ensuring the
durability of the transaction.  The call to sync() is very expensive
and is what is optimized out for the asynchronous transaction mode.

This is my understanding as a user. I do not write the code that does this.

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to