Fehler: Die Datenbank "Backend" wird von anderen Benutzern zugegriffen. Details: Es gibt 3 weitere Sitzungen mit der Datenbank.
sudo service postgresql restart
Lucas Juan
sudo service postgresql restart
PostgresVersion >=9.2
SELECT
pg_terminate_backend(pg_stat_activity.pid)
FROM pg_stat_activity
WHERE
pg_stat_activity.datname = 'name_of_database_to_be_disconnected'
AND pid <> pg_backend_pid()
SELECT pid, pg_terminate_backend(pid)
FROM pg_stat_activity
WHERE datname = current_database() AND pid <> pg_backend_pid();
SELECT pg_terminate_backend(pg_stat_activity.pid)
FROM pg_stat_activity
WHERE pg_stat_activity.datname = 'database_name'
AND pid <> pg_backend_pid();