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

From: <Atul(dot)Goel(at)globaldatapoint(dot)com>
To: <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Kill -9 for a session process caused all the sessions to be killed
Date: 2010-09-23 08:56:17
Message-ID: 418EC9BD4D7125488CCAC5C7C559A248164F295B@MS10.lsc.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thanks Tom,

I found the right way to kill the process.

Regards,
Atul Goel

-----Original Message-----
From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
Sent: 22 September 2010 17:43
To: Atul Goel
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] Kill -9 for a session process caused all the sessions to be killed

<Atul(dot)Goel(at)globaldatapoint(dot)com> writes:
> 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.

> This caused all other sessions in the system to be killed and database was unreachable for a minute or so.

> MY QUESTION: Is this normal?

Yes. That is not the recommended way to cancel a query.

regards, tom lane
This e-mail is confidential and should not be used by anyone who is not the original intended recipient. Global DataPoint Limited does not accept liability for any statements made which are clearly the sender's own and not expressly made on behalf of Global DataPoint Limited. No contracts may be concluded on behalf of Global DataPoint Limited by means of e-mail communication. Global DataPoint Limited Registered in England and Wales with registered number 3739752 Registered Office Middlesex House, 34-42 Cleveland Street, London W1T 4LB

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Boris 2010-09-23 09:51:27 Unable to upgrade old cluster from 8.4 to 9.0
Previous Message Raymond O'Donnell 2010-09-23 08:18:49 Re: [pgsql-sql] Daily digest v1.3328 (5 messages)