Re: Function to kill backend

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Function to kill backend
Дата
Msg-id 10110.1080954394@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Function to kill backend  (Andrew Dunstan <andrew@dunslane.net>)
Ответы Re: Function to kill backend  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> Tom Lane wrote:
>> it would definitely need to be a lot more constrained than
>> send-any-signal-to-any-postgres-process ... even for a superuser,
>> that's a mighty fat-gauge foot-gun.

> What sort of constraints do you have in mind?

I'd limit it to SIGINT (query cancel) and SIGTERM (fast shutdown),
and I'm not even real sure about SIGTERM.  That facility is designed to
work in the case of shutting down all backends together --- I'm not sure
I want to promise that it behaves pleasantly to SIGTERM one backend and
leave the rest going.  Nor do I see a real good use-case for it.

Also, no killing processes that aren't regular backends (eg, the
bgwriter, the stats processes, and most especially the postmaster).

Another point is that killing by PID is not necessarily what you want to
do --- kill by transaction ID might be a better API, especially for
query-cancel cases.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [GENERAL] Large DB
Следующее
От: Manfred Koizar
Дата:
Сообщение: Re: [GENERAL] Large DB