删除库的时候报错

ERROR: database "temp_test_yang" is being accessed by other users
DETAIL: There are 4 other sessions using the database.

 
说明该temp_test_yang库正在被人连接。解决方法是:
查询出连接该数据库的进程,并将其杀死(比较暴力)
select pg_terminate_backend(pid) from pg_stat_activity where DATNAME = 'temp_test_yang';

相关文章:

  • 2021-07-21
  • 2021-06-19
  • 2022-01-10
  • 2021-11-30
  • 2021-05-31
  • 2021-10-15
  • 2021-08-26
猜你喜欢
  • 2021-12-21
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-29
  • 2021-06-24
  • 2021-10-27
相关资源
相似解决方案