Re: Sleep functions

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: Sleep functions
Дата
Msg-id 4309FDB3.2070900@dunslane.net
обсуждение исходный текст
Ответ на Re: Sleep functions  (Greg Stark <gsstark@mit.edu>)
Список pgsql-hackers

Greg Stark wrote:

>"Dave Page" <dpage@vale-housing.co.uk> writes:
>
>  
>
>>Sure it's trivial in various languages, even in trusted PL/Tcl:
>>
>>CREATE FUNCTION sleep(integer) RETURNS void AS $$
>>after [expr $1 * 1000]
>>$$ LANGUAGE pltcl STRICT;
>>    
>>
>
>Do any of the trusted languages count branches and abort after some large
>number to prevent trusted code from causing long delays?
>
>  
>

I don't believe so. What arbitrary limit would you like to set?

The thing that bothers me slightly about doing this in PLs is that it 
might well monkey with the signal handling which could cause very hard 
to debug problems. But maybe that's just paranoia - I haven't looked at 
it closely.

cheers

andrew


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: enable_constraint_exclusion GUC name
Следующее
От: Hannu Krosing
Дата:
Сообщение: Re: Missing CONCURRENT VACUUM (Was: Release notes for