Re: pg_sleep_enhancements.patch
От | Pavel Stehule |
---|---|
Тема | Re: pg_sleep_enhancements.patch |
Дата | |
Msg-id | CAFj8pRDh0mnmPsiHaY5SEZmz=SihH+WZDdKkR_SS0fPD+mgq-A@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: pg_sleep_enhancements.patch (Vik Fearing <vik.fearing@dalibo.com>) |
Ответы |
Re: pg_sleep_enhancements.patch
|
Список | pgsql-hackers |
2014-01-29 Vik Fearing <vik.fearing@dalibo.com>
On 01/29/2014 08:04 PM, Pavel Stehule wrote:Thank you for looking at it.
> Hello
>
> I am looking on this patchOkay.
> http://www.postgresql.org/message-id/525FE206.6000502@dalibo.com
>
> a) pg_sleep_for - no objection - it is simple and secureThere is no risk there, the wake up time is specified with time zone.
> b) pg_sleep_until
>
> I am not sure - maybe this implementation is too simply. I see two
> possible risk where it should not work as users can expect
>
> a) what will be expected behave whem time is changed - CET/CEST ?We could do that, but it seems like overkill. It would mean writing a
> b) what will be expected behave when board clock is not accurate and
> it is periodically fixed (by NTP) - isn't better to sleep only few
> seconds and recalculate sleeping interval?
new C function whereas this is just a simple helper for the existing
pg_sleep() function. So my vote is to keep the patch as-is.
Ok
second question - is not this functionality too dangerous? If somebody use it as scheduler, then
a) can holds connect, session data, locks too long time
b) it can stop on query timeout probably much more early then user expect
What is expected use case?
Regards
Pavel
--
Vik
В списке pgsql-hackers по дате отправления: