Re: pg_usleep for multisecond delays

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pg_usleep for multisecond delays
Дата
Msg-id 4077536.1676042314@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: pg_usleep for multisecond delays  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: pg_usleep for multisecond delays  (Nathan Bossart <nathandbossart@gmail.com>)
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> I somehow feel that we should be trying to get rid of cases where
> WaitLatch is not desired.

+1

> I wonder if we should have a wrapper around WaitLatch() that documents
> that if the latch is set before the time expires, it will reset the
> latch and try again to wait for the remaining time, after checking for
> interrupts etc.

Resetting the latch seems not very friendly for general-purpose use
... although I guess we could set it again on the way out.

BTW, we have an existing pg_sleep() function that deals with all
of this except re-setting the latch.

            regards, tom lane



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: pg_usleep for multisecond delays
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: run pgindent on a regular basis / scripted manner