Kill a session in postgres
-- First find the pid of the session:
postgresql configurationintermediate
by PostgreSQL
12 views
-- First find the pid of the session:
123456
-- First find the pid of the session:
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 kill that particular session..>>
dbaclass#
select pg_terminate_backend(pid) from pg_stat_activity where pid='1123';Please to add comments
No comments yet. Be the first to comment!