pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jessica Richard <rjessil@yahoo.com>
To: Kevin Grittner <Kevin.Grittner@wicourts.gov>
To: Jonah H. Harris <jonah.harris@gmail.com>
Cc: pgsql-admin@postgresql.org, Tommy Gildseth <tommy.gildseth@usit.uio.no>
Subject: Re: Is there a way to kill a connection from the pg_stat_activitly list?
Date: Tue, 16 Oct 2007 04:56:00 -0700 (PDT)
Message-ID: <561035.86032.qm@web56402.mail.re3.yahoo.com> (raw)
In-Reply-To: <47136772.EE98.0025.0@wicourts.gov>

If the connection is from the local machine, I can find it with "ps -ef | grep procpid", then kill it with Unix command "kill" outside Postgres...

But I have many remote connections coming from different machines...it is hard to kill on the OS level outside Postgres on the postgres host...

I am looking for something to kill a Postgres user connection within Postgres...
Some thing like, you find the user connection with select * from pg_stat_activity...then you pick a procpid and kill right there...

Thanks,


Kevin Grittner <Kevin.Grittner@wicourts.gov> wrote: >>> On Mon, Oct 15, 2007 at 12:34 PM, in message
<36e682920710151034r2aaef401m5429e460ee0ac209@mail.gmail.com>, "Jonah H.
Harris"  wrote: 
> 
> There used to be a pg_terminate_backend, but it was #ifdef'd out due
> to corruption concerns.  Basically, all it did was:
> 
> kill -TERM pid
> 
> I'm not sure whether anyone has completed the research required to
> know if anything remains corrupted, but it is used occasionally.  Best
> to do pg_cancel_backend and then kill -TERM.
 
Where does pg_ctl kill fit in?
 
Is TERM the normal signal to use there, too?
 
Should the pg_ctl docs give some guidelines on the signals?
 
-Kevin
 



---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings


       
---------------------------------
Be a better Globetrotter. Get better travel answers from someone who knows.
Yahoo! Answers - Check it out.

view thread (13+ messages)  latest in thread

Message-ID: <561035.86032.qm@web56402.mail.re3.yahoo.com>
Permalink:  ../561035.86032.qm@web56402.mail.re3.yahoo.com/
Also on:    postgresql.org/message-id/561035.86032.qm@web56402.mail.re3.yahoo.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: rjessil@yahoo.com, Kevin.Grittner@wicourts.gov, jonah.harris@gmail.com, tommy.gildseth@usit.uio.no
  Subject: Re: Is there a way to kill a connection from the pg_stat_activitly list?
  In-Reply-To: <561035.86032.qm@web56402.mail.re3.yahoo.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox