Re: Restart pg_usleep when interrupted
От | Tom Lane |
---|---|
Тема | Re: Restart pg_usleep when interrupted |
Дата | |
Msg-id | 2100439.1719610468@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Restart pg_usleep when interrupted (Sami Imseih <samimseih@gmail.com>) |
Ответы |
Re: Restart pg_usleep when interrupted
Re: Restart pg_usleep when interrupted |
Список | pgsql-hackers |
Sami Imseih <samimseih@gmail.com> writes: > Reattaching the patch. I feel like this is fundamentally a wrong solution, for the reasons cited in the comment for pg_usleep: long sleeps are a bad idea because of the resulting uncertainty about whether we'll respond to interrupts and such promptly. An example here is that if we get a query cancel interrupt, we should probably not insist on finishing out the current sleep before responding. Therefore, rather than "improving" pg_usleep (and uglifying its API), the right answer is to fix parallel vacuum leaders to not depend on pg_usleep in the first place. A better idea might be to use pg_sleep() or equivalent code. regards, tom lane
В списке pgsql-hackers по дате отправления: