...
- Log onto your SDW using pgAdmin and connect to the database as the Posgres user.
- Run the following SQL which will list all of the current running sessions.
Code Block |
---|
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query FROM pg_stat_activity WHERE current_query != '<IDLE>'
AND current_query NOT ILIKE '%pg_stat_activity%' ORDER BY query_start desc; |
Paste code macro |
---|
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query FROM pg_stat_activity WHERE current_query != '<IDLE>'
AND current_query NOT ILIKE '%pg_stat_activity%' ORDER BY query_start desc; |
- You can cancel the running session using the following SQL where procpid is the procpid value for the session from the previous query.
Paste code macro |
---|
SELECT pg_cancel_backend(procpid); |
SELECT pg_cancel_backend(procpid);