Email this to a friend
 
posted on April 15th 2013, at 08:57
by lunarg

To get a list of running SQL queries, log into the PostgreSQL CLI:

psql -U username database

Replace username and database with the proper values. Then run this query:

SELECT procpid,datname,usename,client_addr,waiting,query_start,current_query FROM pg_stat_activity;

Inside the list is also the procpid, which you will need to kill a running query. To kill, run this query, substituting with the proper procpid:

SELECT pg_cancel_backend(procpid);

Send a link to this post to yourself or a friend.

Send to e-mail:
Your name:
Your e-mail:
Captcha:
Type the letters and numbers as shown.
/get/captcha/1714173973
Not readable? Get another.
 
Information entered is solely used for sending a one-time e-mail, and is not retained and/or passed on to a third party.
 
 
 
 
« April 2024»
SunMonTueWedThuFriSat
 123456
78910111213
14151617181920
21222324252627
282930    
 
Links
 
Quote
« If the batteries of a TV remote run out, why do we press the buttons so much harder? »