Comments
 
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);
 
 
« April 2024»
SunMonTueWedThuFriSat
 123456
78910111213
14151617181920
21222324252627
282930    
 
Links
 
Quote
« Debating Windows vs. Linux vs. Mac is pointless: they all have their merits and flaws, and it ultimately comes to down to personal preference. »
Me