Files
2026-05-18 06:40:19 +00:00

7 lines
354 B
SQL

-- 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';