Re: Sub-millisecond [autovacuum_]vacuum_cost_delay broken

Поиск
Список
Период
Сортировка
От Nathan Bossart
Тема Re: Sub-millisecond [autovacuum_]vacuum_cost_delay broken
Дата
Msg-id 20230309223747.GA3820457@nathanxps13
обсуждение исходный текст
Ответ на Re: Sub-millisecond [autovacuum_]vacuum_cost_delay broken  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Sub-millisecond [autovacuum_]vacuum_cost_delay broken  (Thomas Munro <thomas.munro@gmail.com>)
Список pgsql-hackers
On Thu, Mar 09, 2023 at 05:27:08PM -0500, Tom Lane wrote:
> Is it reasonable to assume that all modern platforms can time
> millisecond delays accurately?  Ten years ago I'd have suggested
> truncating the delay to a multiple of 10msec and using this logic
> to track the remainder, but maybe now that's unnecessary.

If so, it might also be worth updating or removing this comment in
pgsleep.c:

     * NOTE: although the delay is specified in microseconds, the effective
     * resolution is only 1/HZ, or 10 milliseconds, on most Unixen.  Expect
     * the requested delay to be rounded up to the next resolution boundary.

I've had doubts for some time about whether this is still accurate...

-- 
Nathan Bossart
Amazon Web Services: https://aws.amazon.com



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Sub-millisecond [autovacuum_]vacuum_cost_delay broken
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: buildfarm + meson