Re: Kill session in PostgreSQL

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Ardian Xharra <axharra(at)boxxo(dot)info>
Cc: Ashish Karalkar <ashish_postgre(at)yahoo(dot)co(dot)in>, pggeneral <pgsql-general(at)postgresql(dot)org>
Subject: Re: Kill session in PostgreSQL
Date: 2007-04-12 07:00:21
Message-ID: 20070412070021.GB16892@svr2.hagander.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Beware that this is not a supported method, though. It often works, but
don't make it a part of your regular maintenance.

What you can do is use pg_cancel_query() to kick the session back out to
IDLE - that's fully suported, and it will drop any locks the process has,
so it shuold get rid of most of your problem.

//Magnus

On Tue, Apr 10, 2007 at 08:46:20AM -0400, Ardian Xharra wrote:
> You can use kill PID
> ----- Original Message -----
> From: Ashish Karalkar
> To: pggeneral
> Sent: Tuesday, April 10, 2007 8:01 AM
> Subject: [GENERAL] Kill session in PostgreSQL
>
>
> Hello all,
> is there any command just like ORACLE Uses kill session to kill a particular session .
> tried withh linux kill -9 PID but it also kills all other sessions or am I just giving wrong signal to command kill?
>
> Thanks in advance
>
> With Regards
> ashish
>
>
>
> ------------------------------------------------------------------------------
> Check out what you're missing if you're not on Yahoo! Messenger
>
>
> ------------------------------------------------------------------------------
>
>
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.446 / Virus Database: 269.0.0/754 - Release Date: 09/04/2007 22:59

In response to

Browse pgsql-general by date

  From Date Subject
Next Message yli 2007-04-12 07:38:50 Start postgresql failed
Previous Message ramachandra.bhaskaram 2007-04-12 06:47:24 Providing user based previleges to Postgres DB