FIX ERROR — Postgres: database "database_name" is being accessed by other users

Ошибка:

ERROR: database "database_name" is being accessed by other users
DETAIL: There is 1 other session using the database.

Решение:

REVOKE CONNECT ON DATABASE database_name FROM public;
SELECT pg_terminate_backend(pg_stat_activity.pid)
FROM pg_stat_activity
WHERE pg_stat_activity.datname = 'database_name';
0 0 vote
Рейтинг статьи

Метки: Метки

Подписаться
Уведомление о
guest
0 комментариев
Inline Feedbacks
View all comments