Re: Question about concurrent synchronous and asynchronous commits

Поиск
Список
Период
Сортировка
От Vick Khera
Тема Re: Question about concurrent synchronous and asynchronous commits
Дата
Msg-id AANLkTi=qMbDp4pmx-nF3rQk9e3Kbk8__8pNZHhRU2YCy@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Question about concurrent synchronous and asynchronous commits  (Dan Birken <birken@gmail.com>)
Список pgsql-general
On Thu, Jan 13, 2011 at 6:55 PM, Dan Birken <birken@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.

В списке pgsql-general по дате отправления:

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: Record with a field consisting of table rows
Следующее
От: Tom Lane
Дата:
Сообщение: Re: tsearch (or related) question