通过eclipse手工生成osgi-bundle的
982 2023-04-03 02:18:02
PostgreSQL 关闭session链接,删除数据库方法
PostgreSQL 中 有时候想删除数据库(drop database swiftliveqaapi;),发现提示“ERROR: database "xxxxxx" is being accessed by other users DETAIL: There are 30 other sessions using the database.”
解决方法:
SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE datname=' 数据库名' AND pid<>pg_backend_pid();
然后就可以删除数据库了。