您的位置:首页 > 数据库

新建数据库失败,提示"template1" being accessed by other users

2017-02-14 13:11 573 查看
新建数据库提示:
[PostgreSQL] "template1" being accessed by other users

说明该template1模板正在被人连接。我选择的解决方案是:

查询出连接该数据库的进程,并将其杀死(比较暴力)。
select pg_terminate_backend(pid) from pg_stat_activity where DATNAME = 'template1';
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
相关文章推荐