Re: TODO-item: Add sleep() function, remove from regress.c

Поиск
Список
Период
Сортировка
От 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 по дате отправления:

Предыдущее
От: Joachim Wieland
Дата:
Сообщение: Re: TODO-item: Add sleep() function, remove from regress.c
Следующее
От: Neil Conway
Дата:
Сообщение: TupleDesc refcounting