pgadmin postgres error 3a database is being accessed by other users

Solutions on MaxInterview for pgadmin postgres error 3a database is being accessed by other users by the best coders in the world

showing results for - "pgadmin postgres error 3a database is being accessed by other users"
Elías
18 Jul 2019
1PostgresVersion >=9.2
2
3SELECT 
4   pg_terminate_backend(pg_stat_activity.pid)
5FROM pg_stat_activity
6WHERE
7   pg_stat_activity.datname = 'name_of_database_to_be_disconnected'
8AND pid <> pg_backend_pid()