Re: Function to kill backend

Поиск
Список
Период
Сортировка
От Magnus Hagander
Тема Re: Function to kill backend
Дата
Msg-id 6BCB9D8A16AC4241919521715F4D8BCE34B67F@algol.sollentuna.se
обсуждение исходный текст
Ответ на Function to kill backend  ("Magnus Hagander" <mha@sollentuna.net>)
Список pgsql-hackers
>>Hi!
>>
>>When debugging on win32, I've created myself a little function that I
>>feel should be added to the "backend proper". While it adds a lot of
>>vlaue on win32, I think it adds quite a bit of value on non-win32
>>platforms as well...
>>
>>The function is pg_kill_backend(<pid>,<signal>). superuser-only, of
>>course. Which simply sends a signal to the specified backend -
>>querycancel, terminate, etc.
>>
>>
>
>If' we're going to have this shouldn't it be a proper command?
>And maybe
>an internal shutdown command to go with it?

I guess it could be. I guess:

1) I don't know how to do one of those ;-) Which is why I didn't even
think it.

2) Won't that clutter up the namespace more, by introducing more
keywords that you can't use for other things?

3) Will it still be possible to do the kind of things Rod mentioned,
e.g.
SELECT pg_kill_backend(procpid, 'TERM') FROM pg_stat_activity WHERE
current_query LIKE '<IDLE>%';
?

//Magnus


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Function to kill backend
Следующее
От: "Dann Corbit"
Дата:
Сообщение: Re: Function to kill backend