Re: Kill -9 for a session process caused all the sessions to be killed

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: Kill -9 for a session process caused all the sessions to be killed
Дата
Msg-id 4C9AA60B.7080604@postnewspapers.com.au
обсуждение исходный текст
Ответ на Kill -9 for a session process caused all the sessions to be killed  (<Atul.Goel@globaldatapoint.com>)
Список pgsql-general
On 23/09/2010 12:26 AM, Atul.Goel@globaldatapoint.com wrote:
> Hi All,
>
> I by mistake ran a query to update a huge table with around 500000 rows
> and has to kill the session.
>
> I found the process-id from the query select * from pg_stat_activity.

> I killed the process using Kill -9 process_id.

Why kill -9 (SIGKILL)?

Did it not respond to regular SIGTERM (the default for kill) ?

SIGKILL will forcibly terminate a process, with no chance for the
process to flush any half-written buffers, tell other processes it is
being killed, etc. In a system of co-operating processes like the
PostgreSQL server, this is bad.

As per the manual, you should not "kill -9" a backend.

For that matter, you should not as a sysadmin "kill -9" (SIGKILL) any
process at all, unless it fails to respond to SIGTERM after a few
seconds (or longer) and letting it finish whatever it's doing isn't an
option. SIGKILL is a really big hammer.

--
Craig Ringer

Tech-related writing at http://soapyfrogs.blogspot.com/

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

Предыдущее
От: David Wilson
Дата:
Сообщение: Re: [pgsql-sql] Daily digest v1.3328 (5 messages)
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: [pgsql-sql] Daily digest v1.3328 (5 messages)