Re: stray SIGALRM

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: stray SIGALRM
Дата
Msg-id 20130616015416.GG3753@eldon.alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: stray SIGALRM  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: stray SIGALRM  (Stephen Frost <sfrost@snowman.net>)
Список pgsql-hackers
Tom Lane wrote:

> In general, we might want to consider replacing long sleep intervals
> with WaitLatch operations.  I thought for a bit about trying to turn
> pg_usleep itself into a WaitLatch call; but it's also used in frontend
> code where that wouldn't work, and anyway it's not clear this would be
> a good thing for short sleeps.

How about having a #ifdef !FRONTEND code path that uses the latch, and
sleep otherwise?  And maybe use plain sleep for short sleeps in the
backend also, to avoid the latch overhead.  I notice we already have
three implementations of pg_usleep.

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: pluggable compression support
Следующее
От: Stephen Frost
Дата:
Сообщение: Re: stray SIGALRM