Re: TODO-item: Add sleep() function, remove from regress.c
В списке pgsql-patches по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: TODO-item: Add sleep() function, remove from regress.c |
| Дата | |
| Msg-id | 29474.1136905106@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: TODO-item: Add sleep() function, remove from regress.c (Joachim Wieland <joe@mcknight.de>) |
| Список | pgsql-patches |
Joachim Wieland <joe@mcknight.de> writes:
> On Mon, Jan 09, 2006 at 08:50:36PM -0500, Tom Lane wrote:
>> The proposed regression test seems unacceptably fragile, as well as
>> rather pointless.
> Why is it fragile?
As your own comment pointed out, the test would "fail" on a heavily
loaded system, due to sleeping too long. I do not see the need for
such a test anyway --- the stats regression test will exercise the
code sufficiently.
>> BTW, a serious problem with just passing it off to pg_usleep like that
>> is that the sleep can't be aborted by a cancel request
> No, cancelling the sleep works (at least for Unix). Isn't cancelling
> implemented via a signal that interrupts select() ?
On some systems the signal will interrupt select. On some, not.
Note the coding in bgwriter.c's main loop for instance.
regards, tom lane
В списке pgsql-patches по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера