Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

database is being accessed by other users

SELECT pid, pg_terminate_backend(pid) 
FROM pg_stat_activity 
WHERE datname = current_database() AND pid <> pg_backend_pid();
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #database #accessed #users
ADD COMMENT
Topic
Name
9+1 =