Bookmarks

Yahoo Gmail Google Facebook Delicious Twitter Reddit Stumpleupon Myspace Digg

Search queries

docmd.close 2585, WWWXXXAPC, WWWXXXDOCO, nu vot, dhcpd lease file "binding state", WWWXXXDOCO, how to setup procmail to process html2text, how to setup procmail html2text, WWWXXXAPC., XXXCNZZZ

Links

XODOX
Impressum

#1: Is there a way to kill a connection from the pg_stat_activitly list?

Posted on 2007-10-15 14:56:06 by Jessica Richard

--0-1558268327-1192452966=:65196
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

When you see a hanging Postgres connection (or a job running so long and =
you don't want to continue any more) from=20

select * from pg_stat_activity

and you want to disconnect it,

how do you do it?

thanks,
Jessica

=20
---------------------------------
Check out the hottest 2008 models today at Yahoo! Autos.
--0-1558268327-1192452966=:65196
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

When you see a hanging Postgres connection (or a job running so long and =
you don't want to continue any more) from <br><br>select * from pg_stat_a=
ctivity<br><br>and you want to disconnect it,<br><br>how do you do it?<br=
><br>thanks,<br>Jessica<br><p>&#32;
<hr size=3D1> <a href=3D"http://us.rd.yahoo.com/evt=3D51201/*http:/=
/autos.yahoo.com/new_cars.html;_ylc=3DX3oDMTE5NWVzZGVyBF9TAz k3MTA3MDc2BHN=
lYwNtYWlsdGFncwRzbGsDYXV0b3MtbmV3Y2Fy
">Check out </a> the hottest 2008 models today at Yahoo! Autos.




--0-1558268327-1192452966=:65196--

Report this message

#2: Re: Is there a way to kill a connection from the pg_stat_activitlylist?

Posted on 2007-10-15 15:23:21 by Tommy Gildseth

Jessica Richard wrote:
> When you see a hanging Postgres connection (or a job running so long
> and you don't want to continue any more) from
>
> select * from pg_stat_activity
>
> and you want to disconnect it,
>
> how do you do it?

|pg_cancel_backend()


|http://www.postgresql.org/docs/8.1/interactive/functions-ad min.html

--
Tommy Gildseth
DBA, Gruppe for databasedrift
Universitetet i Oslo, USIT
m: +47 45 86 38 50
t: +47 22 85 29 39


---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Report this message

#3: Re: Is there a way to kill a connection from the pg_stat_activitly list?

Posted on 2007-10-15 15:50:15 by jonah.harris

On 10/15/07, Jessica Richard <rjessil@yahoo.com> wrote:
> When you see a hanging Postgres connection (or a job running so long and you
> don't want to continue any more) from
>
> select * from pg_stat_activity
>
> and you want to disconnect it,
>
> how do you do it?

See pg_cancel_backend

You should also look at using statement_timeout if this is a regular occurrence.


--
Jonah H. Harris, Sr. Software Architect | phone: 732.331.1324
EnterpriseDB Corporation | fax: 732.331.1301
499 Thornall Street, 2nd Floor | jonah.harris@enterprisedb.com
Edison, NJ 08837 | http://www.enterprisedb.com/

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

Report this message

#4: Re: Is there a way to kill a connection from the pg_stat_activitly list?

Posted on 2007-10-15 19:18:24 by Jessica Richard

--0-1711225073-1192468704=:68410
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

Thanks a lot!

"select pg_cancel_backend(procpid) " can end the current query for that u=
ser, but then this connection becomes IDLE, still connected.

Is there a command for me to totally disconnect a user by procpid? Some t=
imes, I need to kick out a particular Postgres user completely.

thanks


Tommy Gildseth <tommy.gildseth@usit.uio.no> wrote: Jessica Richard wrote:
> When you see a hanging Postgres connection (or a job running so long=20
> and you don't want to continue any more) from
>
> select * from pg_stat_activity
>
> and you want to disconnect it,
>
> how do you do it?

|pg_cancel_backend()


|http://www.postgresql.org/docs/8.1/interactive/functions-ad min.html

--=20
Tommy Gildseth
DBA, Gruppe for databasedrift
Universitetet i Oslo, USIT
m: +47 45 86 38 50
t: +47 22 85 29 39


---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend


=20
---------------------------------
Need a vacation? Get great deals to amazing places on Yahoo! Travel.=20
--0-1711225073-1192468704=:68410
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

Thanks a lot!<br><br>"select pg_cancel_backend(procpid) " can end the cur=
rent query for that user, but then this connection becomes IDLE, still co=
nnected.<br><br>Is there a command for me to totally disconnect a user by=
procpid? Some times, I need to kick out a particular Postgres user compl=
etely.<br><br>thanks<br><br><br><b><i>Tommy Gildseth &lt;tommy.gildseth@u=
sit.uio.no&gt;</i></b> wrote:<blockquote class=3D"replbq" style=3D"border=
-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;">=
Jessica Richard wrote:<br>&gt; When you see a hanging Postgres connectio=
n (or a job running so long <br>&gt; and you don't want to continue any m=
ore) from<br>&gt;<br>&gt; select * from pg_stat_activity<br>&gt;<br>&gt; =
and you want to disconnect it,<br>&gt;<br>&gt; how do you do it?<br><br>|=
pg_cancel_backend()<br><br><br>|http://www.postgresql.org/docs/8.1/intera=
ctive/functions-admin.html<br><br>-- <br>Tommy Gildseth<br>DBA, Gruppe fo=
r databasedrift<br>Universitetet i Oslo,
USIT<br>m: +47 45 86 38 50<br>t: +47 22 85 29 39<br><br><br>------------=
---------------(end of broadcast)---------------------------<br>TIP 6: ex=
plain analyze is your friend<br></blockquote><br><p>&#32;
<hr size=3D1>Need a vacation? <a href=3D"http://us.rd.yahoo.com/evt=
=3D48256/*http://travel.yahoo.com/;_ylc=3DX3oDMTFhN2hucjlpBF 9TAzk3NDA3NTg=
5BHBvcwM1BHNlYwNncm91cHMEc2xrA2VtYWlsLW5jbQ--">Get great deals=20
to amazing places </a>on Yahoo! Travel.=20
--0-1711225073-1192468704=:68410--

Report this message

#5: Re: Is there a way to kill a connection from the pg_stat_activitly list?

Posted on 2007-10-15 19:34:27 by Scott Marlowe

On 10/15/07, Jessica Richard <rjessil@yahoo.com> wrote:
> Thanks a lot!
>
> "select pg_cancel_backend(procpid) " can end the current query for that
> user, but then this connection becomes IDLE, still connected.
>
> Is there a command for me to totally disconnect a user by procpid? Some
> times, I need to kick out a particular Postgres user completely.

From the command line on the server you can issue a kill <pid> to do
that. From within pgsql you'd need to write a function in an
untrusted language to pull it off.

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Report this message

#6: Re: Is there a way to kill a connection from the pg_stat_activitly list?

Posted on 2007-10-15 19:34:50 by jonah.harris

On 10/15/07, Jessica Richard <rjessil@yahoo.com> wrote:
> Thanks a lot!
>
> "select pg_cancel_backend(procpid) " can end the current query for that
> user, but then this connection becomes IDLE, still connected.
>
> Is there a command for me to totally disconnect a user by procpid? Some
> times, I need to kick out a particular Postgres user completely.

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.


--
Jonah H. Harris, Sr. Software Architect | phone: 732.331.1324
EnterpriseDB Corporation | fax: 732.331.1301
499 Thornall Street, 2nd Floor | jonah.harris@enterprisedb.com
Edison, NJ 08837 | http://www.enterprisedb.com/

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Report this message

#7: Re: Is there a way to kill a connection from the

Posted on 2007-10-15 20:13:23 by Kevin Grittner

>>> On Mon, Oct 15, 2007 at 12:34 PM, in message
<36e682920710151034r2aaef401m5429e460ee0ac209@mail.gmail.com>, "Jonah H.
Harris" <jonah.harris@gmail.com> wrote:=20
>=20
> There used to be a pg_terminate_backend, but it was #ifdef'd out due
> to corruption concerns. Basically, all it did was:
>=20
> kill -TERM pid
>=20
> 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.
=20
Where does pg_ctl kill fit in?
=20
Is TERM the normal signal to use there, too?
=20
Should the pg_ctl docs give some guidelines on the signals?
=20
-Kevin
=20



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

Report this message

#8: Re: Is there a way to kill a connection from the pg_stat_activitly list?

Posted on 2007-10-16 13:56:00 by Jessica Richard

--0-122730445-1192535760=:86032
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

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 Post=
gres...
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, 2=
007 at 12:34 PM, in message
<36e682920710151034r2aaef401m5429e460ee0ac209@mail.gmail.com>, "Jonah H.
Harris" wrote:=20
>=20
> There used to be a pg_terminate_backend, but it was #ifdef'd out due
> to corruption concerns. Basically, all it did was:
>=20
> kill -TERM pid
>=20
> 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.
=20
Where does pg_ctl kill fit in?
=20
Is TERM the normal signal to use there, too?
=20
Should the pg_ctl docs give some guidelines on the signals?
=20
-Kevin
=20



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


=20
---------------------------------
Be a better Globetrotter. Get better travel answers from someone who know=
s.
Yahoo! Answers - Check it out.
--0-122730445-1192535760=:86032
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

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...=
<br><br>But I have many remote connections coming from different machines=
....it is hard to kill on the OS level outside Postgres on the postgres ho=
st...<br><br>I am looking for something to kill a Postgres user connectio=
n within Postgres...<br>Some thing like, you find the user connection wit=
h select * from pg_stat_activity...then you pick a procpid and kill right=
there...<br><br>Thanks,<br><br><br><b><i>Kevin Grittner &lt;Kevin.Grittn=
er@wicourts.gov&gt;</i></b> wrote:<blockquote class=3D"replbq" style=3D"b=
order-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5=
px;"> &gt;&gt;&gt; On Mon, Oct 15, 2007 at 12:34 PM, in message<br>&lt;36=
e682920710151034r2aaef401m5429e460ee0ac209@mail.gmail.com&gt;, "Jonah H.<=
br>Harris" <jonah.harris@gmail.com> wrote: <br>&gt; <br>&gt; There used t=
o be a pg_terminate_backend, but it was
#ifdef'd out due<br>&gt; to corruption concerns. Basically, all it did =
was:<br>&gt; <br>&gt; kill -TERM pid<br>&gt; <br>&gt; I'm not sure whethe=
r anyone has completed the research required to<br>&gt; know if anything =
remains corrupted, but it is used occasionally. Best<br>&gt; to do pg_ca=
ncel_backend and then kill -TERM.<br> <br>Where does pg_ctl kill fit in?<=
br> <br>Is TERM the normal signal to use there, too?<br> <br>Should the p=
g_ctl docs give some guidelines on the signals?<br> <br>-Kevin<br> <br><b=
r><br><br>---------------------------(end of broadcast)------------------=
---------<br>TIP 5: don't forget to increase your free space map settings=
<br></jonah.harris@gmail.com></blockquote><br><p>&#32;
<hr size=3D1>Be a better Globetrotter. <a href=3D"http://us.rd.yaho=
o.com/evt=3D48254/*http://answers.yahoo.com/dir/_ylc=3DX3oDM TI5MGx2aThyBF=
9TAzIxMTU1MDAzNTIEX3MDMzk2NTQ1MTAzBHNlYwNCQUJwaWxsYXJfTklfMz YwBHNsawNQcm9=
kdWN0X3F1ZXN0aW9uX3BhZ2U-?link=3Dlist&sid=3D396545469">Get better travel =
answers </a>from someone who knows.<br>Yahoo! Answers - Check it out.


--0-122730445-1192535760=:86032--

Report this message

#9: Re: Is there a way to kill a connection from the pg_stat_activitly list?

Posted on 2007-10-16 14:00:07 by jonah.harris

On 10/16/07, Jessica Richard <rjessil@yahoo.com> wrote:
> 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...

Write a C stored procedure that takes a pid and calls kill(2), install
it on the server, and call it from SQL.

--
Jonah H. Harris, Sr. Software Architect | phone: 732.331.1324
EnterpriseDB Corporation | fax: 732.331.1301
499 Thornall Street, 2nd Floor | jonah.harris@enterprisedb.com
Edison, NJ 08837 | http://www.enterprisedb.com/

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Report this message

#10: Re: Is there a way to kill a connection from the pg_stat_activitly list?

Posted on 2007-10-16 14:03:30 by Jessica Richard

--0-454119703-1192536210=:90208
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

select pg_cancel_backend(procpid) solved half of my problem...at least it=
terminated the query for that user... but it is still holding a user con=
nection in IDLE state....If I have too many of those, Postgres may run of=
out of user connections....

I already knew how to kill a connection if the connection is from the loc=
al host. But I have many remote connections coming from different machine=
s... hard to kill with unix command "kill"... One time, I was testing to=
kill a particular connection on a testing machine, the entrie Postgres w=
as brought down....

I need to find a safer, cleaner way to disconnect a user from Postgres wh=
en needed.

Thanks a lot,


Scott Marlowe <scott.marlowe@gmail.com> wrote: On 10/15/07, Jessica Richa=
rd wrote:
> Thanks a lot!
>
> "select pg_cancel_backend(procpid) " can end the current query for that
> user, but then this connection becomes IDLE, still connected.
>
> Is there a command for me to totally disconnect a user by procpid? Some
> times, I need to kick out a particular Postgres user completely.

From the command line on the server you can issue a kill=20
to do
that. From within pgsql you'd need to write a function in an
untrusted language to pull it off.

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster



=20
---------------------------------
Don't let your dream ride pass you by. Make it a reality with Yahoo! A=
utos.=20
--0-454119703-1192536210=:90208
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

select pg_cancel_backend(procpid) solved half of my problem...at least it=
terminated the query for that user... but it is still holding a user con=
nection in IDLE state....If I have too many of those, Postgres may run of=
out of user connections....<br><br>I already knew how to kill a connecti=
on if the connection is from the local host. But I have many remote conne=
ctions coming from different machines... hard to kill with unix command "=
kill"...&nbsp; One time, I was testing to kill a particular connection on=
a testing machine, the entrie Postgres was brought down....<br><br>I nee=
d to find a safer, cleaner way to disconnect a user from Postgres when ne=
eded.<br><br>Thanks a lot,<br><br><br><b><i>Scott Marlowe &lt;scott.marlo=
we@gmail.com&gt;</i></b> wrote:<blockquote class=3D"replbq" style=3D"bord=
er-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;=
"> On 10/15/07, Jessica Richard <rjessil@yahoo.com> wrote:<br>&gt; Thanks=
a lot!<br>&gt;<br>&gt; "select
pg_cancel_backend(procpid) " can end the current query for that<br>&gt; =
user, but then this connection becomes IDLE, still connected.<br>&gt;<br>=
&gt; Is there a command for me to totally disconnect a user by procpid? S=
ome<br>&gt; times, I need to kick out a particular Postgres user complete=
ly.<br><br>From the command line on the server you can issue a kill <pid>=
to do<br>that. From within pgsql you'd need to write a function in an<b=
r>untrusted language to pull it off.<br><br>---------------------------(e=
nd of broadcast)---------------------------<br>TIP 2: Don't 'kill -9' the=
postmaster<br></pid></rjessil@yahoo.com></blockquote><br><p>&#32;
<hr size=3D1>Don't let your dream ride pass you by. <a href=3D"htt=
p://us.rd.yahoo.com/evt=3D51200/*http://autos.yahoo.com/inde x.html;_ylc=3D=
X3oDMTFibjNlcHF0BF9TAzk3MTA3MDc2BHNlYwNtYWlsdGFncwRzbGsDYXV0 b3MtZHJlYW1jY=
XI-"> Make it a reality</a> with Yahoo! Autos.



=20


--0-454119703-1192536210=:90208--

Report this message

#11: Re: Is there a way to kill a connection from the pg_stat_activitly list?

Posted on 2007-10-16 15:05:48 by jonah.harris

On 10/16/07, Jessica Richard <rjessil@yahoo.com> wrote:
> select pg_cancel_backend(procpid) solved half of my problem...at least it
> terminated the query for that user... but it is still holding a user
> connection in IDLE state....If I have too many of those, Postgres may run of
> out of user connections....
>
> I already knew how to kill a connection if the connection is from the local
> host. But I have many remote connections coming from different machines...
> hard to kill with unix command "kill"... One time, I was testing to kill a
> particular connection on a testing machine, the entrie Postgres was brought
> down....

That's why I said to write a C stored procedure to do it and install
it on the server. That way you could call it the same way as
pg_cancel_backend.

> I need to find a safer, cleaner way to disconnect a user from Postgres when
> needed.

At this point in time, there isn't one.

--
Jonah H. Harris, Sr. Software Architect | phone: 732.331.1324
EnterpriseDB Corporation | fax: 732.331.1301
499 Thornall Street, 2nd Floor | jonah.harris@enterprisedb.com
Edison, NJ 08837 | http://www.enterprisedb.com/

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Report this message

#12: Re: Is there a way to kill a connection from the pg_stat_activitly list?

Posted on 2007-10-17 13:16:05 by Moiz Kothari

------=_Part_25344_32202908.1192619765859
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi,

Please do not use kill, it sometimes resets all the connection on your db,
you might want to use

pkill -f <string in ps -ef> to kill the connection you want to.

Regards,
Moiz Kothari

On 10/16/07, Jonah H. Harris <jonah.harris@gmail.com> wrote:
>
> On 10/16/07, Jessica Richard <rjessil@yahoo.com> wrote:
> > select pg_cancel_backend(procpid) solved half of my problem...at least
> it
> > terminated the query for that user... but it is still holding a user
> > connection in IDLE state....If I have too many of those, Postgres may
> run of
> > out of user connections....
> >
> > I already knew how to kill a connection if the connection is from the
> local
> > host. But I have many remote connections coming from different
> machines...
> > hard to kill with unix command "kill"... One time, I was testing to
> kill a
> > particular connection on a testing machine, the entrie Postgres was
> brought
> > down....
>
> That's why I said to write a C stored procedure to do it and install
> it on the server. That way you could call it the same way as
> pg_cancel_backend.
>
> > I need to find a safer, cleaner way to disconnect a user from Postgres
> when
> > needed.
>
> At this point in time, there isn't one.
>
> --
> Jonah H. Harris, Sr. Software Architect | phone: 732.331.1324
> EnterpriseDB Corporation | fax: 732.331.1301
> 499 Thornall Street, 2nd Floor | jonah.harris@enterprisedb.com
> Edison, NJ 08837 | http://www.enterprisedb.com/
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
>



--
Hobby Site : http://dailyhealthtips.blogspot.com

------=_Part_25344_32202908.1192619765859
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi,<br><br>Please do not use kill, it sometimes resets all the connection on your db, you might want to use <br><br>pkill -f &lt;string in ps -ef&gt; to kill the connection you want to.<br><br>Regards,<br>Moiz Kothari<br><br>
<div><span class="gmail_quote">On 10/16/07, <b class="gmail_sendername">Jonah H. Harris</b> &lt;<a href="mailto:jonah.harris@gmail.com">jonah.harris@gmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On 10/16/07, Jessica Richard &lt;<a href="mailto:rjessil@yahoo.com">rjessil@yahoo.com</a>&gt; wrote:<br>&gt; select pg_cancel_backend(procpid) solved half of my problem...at least it<br>&gt; terminated the query for that user... but it is still holding a user
<br>&gt; connection in IDLE state....If I have too many of those, Postgres may run of<br>&gt; out of user connections....<br>&gt;<br>&gt; I already knew how to kill a connection if the connection is from the local<br>&gt; host. But I have many remote connections coming from different machines...
<br>&gt; hard to kill with unix command &quot;kill&quot;...&nbsp;&nbsp;One time, I was testing to kill a<br>&gt; particular connection on a testing machine, the entrie Postgres was brought<br>&gt; down....<br><br>That&#39;s why I said to write a C stored procedure to do it and install
<br>it on the server.&nbsp;&nbsp;That way you could call it the same way as<br>pg_cancel_backend.<br><br>&gt; I need to find a safer, cleaner way to disconnect a user from Postgres when<br>&gt; needed.<br><br>At this point in time, there isn&#39;t one.
<br><br>--<br>Jonah H. Harris, Sr. Software Architect | phone: 732.331.1324<br>EnterpriseDB Corporation&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;| fax: 732.331.1301<br>499 Thornall Street, 2nd Floor&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;| <a href="mailto:jonah.harris@enterprisedb.com">
jonah.harris@enterprisedb.com</a><br>Edison, NJ 08837&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;| <a href="http://www.enterprisedb.com/">http://www.enterprisedb.com/</a><br><br>---------------------------(end of broadcast)---------------------------
<br>TIP 1: if posting/reading through Usenet, please send an appropriate<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; subscribe-nomail command to <a href="mailto:majordomo@postgresql.org">majordomo@postgresql.org</a> so that your<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; message can get through to the mailing list cleanly
<br></blockquote></div><br><br clear="all"><br>-- <br>Hobby Site : <a href="http://dailyhealthtips.blogspot.com">http://dailyhealthtips.blogspot.com</a>

------=_Part_25344_32202908.1192619765859--

Report this message

#13: Re: Is there a way to kill a connection from the pg_stat_activitly list?

Posted on 2007-10-17 14:00:35 by jonah.harris

On 10/17/07, Moiz Kothari <moizpostgres@gmail.com> wrote:
> Please do not use kill

More like, please do not take advice from people who don't know what
they're talking about.

> it sometimes resets all the connection on your db,
> you might want to use

Honestly, was this supposed to be a joke? Have you RTFM? Have you
looked at the code to pkill? pkill calls kill and frankly, pkill is
more dangerous if you only want to kill a single session.

Grr, I'm surprised to see such an uninformed statement on this list.

--
Jonah H. Harris, Sr. Software Architect | phone: 732.331.1324
EnterpriseDB Corporation | fax: 732.331.1301
499 Thornall Street, 2nd Floor | jonah.harris@enterprisedb.com
Edison, NJ 08837 | http://www.enterprisedb.com/

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

Report this message