| От | Tom Lane |
|---|---|
| Тема | Re: Intervening in Parser -> Planner Stage |
| Дата | |
| Msg-id | 17423.1015354027@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Intervening in Parser -> Planner Stage ("Arguile" <arguile@lucentstudios.com>) |
| Список | pgsql-hackers |
"Arguile" <arguile@lucentstudios.com> writes:
> I'm currently pursuing a line of thought on resource limiting, and I'd like
> some opinions on whether it's possible/probable.
These seem like fairly indirect ways of limiting resource usage. Why
not instead set a direct limit on the amount of runtime allowed?
Postgres doesn't use the ITIMER_VIRTUAL (CPU time) timer, so about all
you'd need issetitimer(ITIMER_VIRTUAL, &itimer, NULL);
to a suitable limit before starting query execution, and cancel it again
at successful query end. Set the SIGVTALRM signal handler to
QueryCancelHandler (same as SIGINT), and voila. A direct solution in
about ten lines of code ...
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера