ERROR: database "X" is being accessed by other users
DETAIL: There is 1 other session using the database
Solution :
You need to replace only database name in above query.DETAIL: There is 1 other session using the database
Solution :
SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE pid <> pg_backend_pid() AND datname = 'database-name';
Now you can drop the database or perform other activity what you were trying to perform.
No comments:
Post a Comment