Re: Reduced power consumption in WAL Writer process

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема Re: Reduced power consumption in WAL Writer process
Дата
Msg-id CA+U5nMLvkZX94BQu+DFriz+9+wa3CzqQLqDSeoEW9-TZrOGGCg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Reduced power consumption in WAL Writer process  (Fujii Masao <masao.fujii@gmail.com>)
Ответы Re: Reduced power consumption in WAL Writer process
Re: Reduced power consumption in WAL Writer process
Список pgsql-hackers
On Thu, Jul 14, 2011 at 9:57 AM, Fujii Masao <masao.fujii@gmail.com> wrote:

> Currently walwriter might write out the WAL before a transaction commits.
> IOW, walwriter tries to write out the WAL in wal_buffers in every wakeups.
> This might be useful for long transaction which generates lots of WAL
> records before commit. So we should call SetLatch() in XLogInsert() instead
> of RecordTransactionCommit()? Though I'm not sure how much walwriter
> improves the performance of synchronous commit case..

Yeh, we did previously have a heuristic to write out the WAL when it
was more than half full. Not sure I want to put exactly that code back
into such a busy code path.

I suggest that we set latch every time the wal buffers wrap.

So at the bottom of AdvanceXLInsertBuffer(), if nextidx == 0 then
SetLatch on the WALWriter.

That's a simple test and we only check it if we're switch WAL buffer page.

--
 Simon Riggs                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


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

Предыдущее
От: Alexander Korotkov
Дата:
Сообщение: Re: WIP: Fast GiST index build
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Reduced power consumption in WAL Writer process