Re: AutoVacuum starvation from sinval messages

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: AutoVacuum starvation from sinval messages
Дата
Msg-id 20647.1352412983@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: AutoVacuum starvation from sinval messages  (Jeff Janes <jeff.janes@gmail.com>)
Список pgsql-hackers
Jeff Janes <jeff.janes@gmail.com> writes:
> On Thu, Nov 8, 2012 at 12:36 PM, Jeff Janes <jeff.janes@gmail.com> wrote:
>> Should gettimeofday be called before and after the poll() and then the
>> difference deducted from timeout?

> Something like this?

Meh.  Not like that, because

(1) we shouldn't add overhead when no timeout is requested.
(2) it'd be better to do only one gettimeofday at the start and then
one in the EINTR path, not one per loop; this saves syscalls and also
avoids slippage of the timeout time.
(3) the select() path needs a similar fix.

But I think you have a good idea to use the INSTR_TIME macros instead
of custom code, even though this is Unix-only so there's not more than
one underlying implementation.

Will fix this up and commit.
        regards, tom lane



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: AutoVacuum starvation from sinval messages
Следующее
От: Tom Lane
Дата:
Сообщение: Re: AutoVacuum starvation from sinval messages