SELECT pg_terminate_backend(pg_stat_activity.pid)标签:stat,数据库,pid,PGSQL,修改,hot,pg,activity,backend From: https://blog.51cto.com/u_14650780/5998672
FROM pg_stat_activity
WHERE datname='hot' AND pid<>pg_backend_pid(); alter database hot rename to hot_predict;