Re: Why BgWriterDelay is fixed?

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: Why BgWriterDelay is fixed?
Дата
Msg-id CAEYLb_WSi8usfQA0qoLrdme4O+S6-mjc_bbUqMXRRQgP+qPfrg@mail.gmail.com
обсуждение исходный текст
Ответ на Why BgWriterDelay is fixed?  (高健 <luckyjackgao@gmail.com>)
Список pgsql-general
On 29 October 2012 07:17, 高健 <luckyjackgao@gmail.com> wrote:
> But I also found  the following in postgresql.conf:
> #bgwriter_delay = 200ms                 # 10-10000ms between rounds
> It is now comment .
> But according to the fixed code of  BgWriterDelay = 200, even when I update
> bgwriter_delay in postgresql.conf to a different value(eg 300ms),
> how can it ovewrite the fixed  200ms in bgwriter.c ?

That value is just a default, that we initialise the variable to as a
sort of a reminder. We do this all over the place. Setting
bgwriter_delay downwards will alter the frequency of iterations.

The WaitLatch() thing is purely concerned with keeping the number of
wake-ups low. As long as your database server does not idle, the logic
is effectively exactly the same as what you'll see in 9.1, where the
event loop is much simpler, and merely sleeps exactly bgwriter_delay
ms every iteration.

--
Peter Geoghegan       http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training and Services


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

Предыдущее
От: Jeff Janes
Дата:
Сообщение: Re: How to print application_name in log_line_prefix (using %a)?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Why BgWriterDelay is fixed?