Re: check for interrupts in set_rtable_names
От | Jeff Janes |
---|---|
Тема | Re: check for interrupts in set_rtable_names |
Дата | |
Msg-id | CAMkU=1zdqb1a990faVY5POB3J6kbFQBBVd6z0aDsH-=e1eFf1A@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: check for interrupts in set_rtable_names (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: check for interrupts in set_rtable_names
|
Список | pgsql-hackers |
On Fri, Nov 13, 2015 at 3:13 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote: > Jeff Janes <jeff.janes@gmail.com> writes: >> Someone sent my server a deranged query, it tripped my >> auto_explain.log_min_duration setting, that hit some kind of >> pathological case while assigning aliases, and now it sits >> uninterruptibly in set_rtable_names for hours. > >> Is there any reason we can't check for interrupts in set_rtable_names, >> like the attached? > > There's probably no reason not to do that, but I'd be much more interested > in eliminating the slowness to begin with ... I was thinking about that as well, but I don't think that would be back-patchable, at least not the way I was envisioning it. I was thinking of detecting bad cases (had to count to over 10 before finding a novel name, more than 10 times) and then switching from an object-local count, to a global count, for the numbers to add to the name. But that would be a behavior change under some conditions. I think the code says it clearer than prose, so crude first attempt at that attached. Cheers, Jeff
Вложения
В списке pgsql-hackers по дате отправления: