pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Killing a child process
3+ messages / 3 participants
[nested] [flat]

* Killing a child process
@ 2002-04-16 00:11 Bojan Belovic <bbelovic@usa.net>
  2002-04-16 00:28 ` Re: Killing a child process Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 3+ messages in thread

From: Bojan Belovic @ 2002-04-16 00:11 UTC (permalink / raw)
  To: pgsql-admin

Every once in a while I'll spot a query that is taking unusually long time
to run (a chiled process that keeps the processor at 100% for like 3
minutes). Is there a way to see the queries currently executing and/or kill
a single process without affecting the operation of the server (I'm not
sure, but I think I tried a simple kill once and that it killed the whole
server)?

Thanks,
Bojan




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Killing a child process
  2002-04-16 00:11 Killing a child process Bojan Belovic <bbelovic@usa.net>
@ 2002-04-16 00:28 ` Tom Lane <tgl@sss.pgh.pa.us>
  2002-04-16 05:06   ` Re: Killing a child process David Stanaway <david@stanaway.net>
  0 siblings, 1 reply; 3+ messages in thread

From: Tom Lane @ 2002-04-16 00:28 UTC (permalink / raw)
  To: Bojan Belovic <bbelovic@usa.net>; +Cc: pgsql-admin

"Bojan Belovic" <bbelovic@usa.net> writes:
> Every once in a while I'll spot a query that is taking unusually long time
> to run (a chiled process that keeps the processor at 100% for like 3
> minutes). Is there a way to see the queries currently executing

ps, top?  Also see the stats views, if you are running 7.2.

> and/or kill
> a single process without affecting the operation of the server

kill -INT to a backend will issue a query cancel, which is pretty safe.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Killing a child process
  2002-04-16 00:11 Killing a child process Bojan Belovic <bbelovic@usa.net>
  2002-04-16 00:28 ` Re: Killing a child process Tom Lane <tgl@sss.pgh.pa.us>
@ 2002-04-16 05:06   ` David Stanaway <david@stanaway.net>
  0 siblings, 0 replies; 3+ messages in thread

From: David Stanaway @ 2002-04-16 05:06 UTC (permalink / raw)
  To: pgsql-admin

On Mon, 2002-04-15 at 19:28, Tom Lane wrote:
> "Bojan Belovic" <bbelovic@usa.net> writes:
> > Every once in a while I'll spot a query that is taking unusually long time
> > to run (a chiled process that keeps the processor at 100% for like 3
> > minutes). Is there a way to see the queries currently executing
> 
> ps, top?  Also see the stats views, if you are running 7.2.
> 
> > and/or kill
> > a single process without affecting the operation of the server
> 
> kill -INT to a backend will issue a query cancel, which is pretty safe.


There is also pgmonitor (Which I think is in contrib) which shows the
stats on the current backend processes (Works on 7.1.3 for me) and is
much nicer for working out whats using CPU, and the query that is
causing the problem.

--
David Stanaway

Attachments:

  signature.asc (application/pgp-signature, 523B) download

^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2002-04-16 05:06 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-04-16 00:11 Killing a child process Bojan Belovic <bbelovic@usa.net>
2002-04-16 00:28 ` Tom Lane <tgl@sss.pgh.pa.us>
2002-04-16 05:06   ` David Stanaway <david@stanaway.net>

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