PostgreSQL Error: database is being accessed by other users | #site_titlePostgreSQL Error: database is being accessed by other users

PHOTO EMBED

Sun Dec 18 2022 18:45:25 GMT+0000 (Coordinated Universal Time)

Saved by @2019cs238

SELECT pid, pg_terminate_backend(pid) 
FROM pg_stat_activity 
WHERE datname = 'database_name' AND pid <> pg_backend_pid();
content_copyCOPY

https://www.postgresql.r2schools.com/postgresql-error-database-is-being-accessed-by-other-users/