double-buffering page writes

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема double-buffering page writes
Дата
Msg-id 20081021160437.GA4001@alvh.no-ip.org
обсуждение исходный текст
Ответы Re: double-buffering page writes  (ITAGAKI Takahiro <itagaki.takahiro@oss.ntt.co.jp>)
Список pgsql-hackers
Hi,

I'm trying to see if it makes sense to do the double-buffering of page
writes before going further ahead with CRC checking.  I came up with the
attached patch; it does the double-buffering inconditionally, because as
it was said, it allows releasing the io_in_progress lock (and resetting
BM_IO_IN_PROGRESS) early.

So far I have not managed to convince me that this is a correct change
to make; the io_in_progress bits are pretty convoluted -- for example, I
wonder how does "releasing" the buffer early (before actually sending
the write to the kernel and marking it not dirty) interact with
checkpoint and a possible full-page image.

Basically the change is to take the unsetting of BM_DIRTY out of
TerminateBufferIO and into its own routine; and in FlushBuffer, release
io_in_progress just after copying the buffer contents elsewhere, and
mark the buffer not dirty after actually doing the write.

Thoughts?

--
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

Вложения

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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: SSL cleanups/hostname verification
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [COMMITTERS] pgsql: SQL 200N -> SQL:2003