May 17, 2026, 11:40 PM
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
-- Here we want to kill all session of the user postgres
|
||||
|
||||
-- List all the session of that user.
|
||||
dbaclass#select datname as database, pid as pid, usename as username, application_name , client_addr, query FROM pg_stat_activity where username='postgres';
|
||||
|
||||
-- Kill all the session of user postgres.
|
||||
|
||||
dbaclass#select pg_terminate_backend(pid) from pg_stat_activity where usename='postgres';
|
||||
Reference in New Issue
Block a user