SELECT *, pg_terminate_backend(pid)
FROM pg_stat_activity
WHERE pid <> pg_backend_pid()
AND datname = '<dbname>';
# kill sessions
# trouver la sessions
select * from pg_stat_activity;
select pg_terminate_backend(pid)
from pg_stat_activity
where pid = 'PID';