From inside any cluster database:
Catch 22: You must first connect to the database. Maybe you can connect as a different user?
To get detailed information about each connection of this user:
SELECT *
FROM pg_stat_activity
WHERE usename = 'user_name';
, () :
SELECT pg_cancel_backend(pid)
FROM pg_stat_activity
WHERE usename = 'user_name'
AND pid <> pg_backend_pid();
, . .
pg_cancel_backend() pg_terminate_backend() .
Linux
? , w370? ( , ).
ps, :
ps -aux
ps -aux | grep psql
( , ):
kill 12457689
SIGKILL SIGTERM:
kill -9 12457689