How to list what queries are running in postgres?

From: "P(dot)A(dot)M(dot) van Dam " <pam(at)ramoth(dot)xs4all(dot)nl>
To: pgsql-admin(at)postgresql(dot)org
Subject: How to list what queries are running in postgres?
Date: 2004-06-23 21:34:46
Message-ID: 20040623213446.GA31224@pmg.xs4all.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi!

I'm looking for a command or method to find out what queries are
currently being serviced by the database.

Once in a while a query goes berzerk and uses up all CPU. I'd like to
find out which query is the culprit and want to kill it off. In Sybase
you can get a list of running "processes" within the database and kill
the offending one. Is there an equivalent in postgres?

Right now we only have the method to shutdown the database en restart it
to get rid of the culprit.

Thanks in advance!

Best regards,

Pascal

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Dragan Matic 2004-06-24 11:56:58 How can I backup database from database itself
Previous Message Chris White (cjwhite) 2004-06-23 21:01:01 Re: Error when dropping table