12345678-- 查找要终止的进程的PIDSELECT pg_terminate_backend(pid)FROM pg_stat_activityWHERE pid <> pg_backend_pid() AND state = 'active';--这将终止进程ID为 27545 的后台进程SELECT pg_terminate_backend(27545);