Re: [HACKERS] Function to kill backend

Поиск
Список
Период
Сортировка
От Andreas Pflug
Тема Re: [HACKERS] Function to kill backend
Дата
Msg-id 41050F0F.40401@pse-consulting.de
обсуждение исходный текст
Ответ на Re: [HACKERS] Function to kill backend  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [HACKERS] Function to kill backend  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: [HACKERS] Function to kill backend  (Oliver Jowett <oliver@opencloud.com>)
Список pgsql-patches
Tom Lane wrote:

>
> If you don't mind plastering a "use at your own risk" sign on it, then
> go for it.

killing a backend is obviously much more "at your own risk" than a
descent function.

Taken from your mail, I understand that a killed backend might leave
some loose ends, eg. open locks, which would degrade the cluster's
performance. Still, it should not corrupt the shared mem, just leave it
as if the backend's still alive and sleeping, right?

You'd kill a backend only if your complete cluster is suffering from it,
and you hope to keep it running by just shooting that process. If the
cluster still has that uncleaned locks or so, you're unlucky and need to
shutdown the cluster.

Maybe we should supply a restricted version of pg_terminate_backend
that's callable from admin interfaces only so we can make sure that the
user was warned what he's doing before the termination is executed,
something like that:

ticket := select pg_admin_ticket();
/* calculate well-known stuff on ticket
    and issue before it times out */
select pg_terminate_backend(ticket_hash);

Regards,
Andreas

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

Предыдущее
От: Oliver Jowett
Дата:
Сообщение: fix for parameterized queries in DECLARE CURSOR statements
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: pg_config