Cancel a session in postgres
-- First find the pid of the session:
postgresql configurationintermediate
by PostgreSQL
13 views
-- First find the pid of the session:
12345
dbaclass#
SELECT datname as database, pid as pid, usename as username, application_name , client_addr , query FROM pg_stat_activity;
<< Lets say the pid=1124, in the below query pass the pid value to cancel that particular session query>>
dbaclass#
select pg_cancel_backend(pid) from pg_stat_activity where pid='1124';Please to add comments
No comments yet. Be the first to comment!