-- 查询表的占用sql并终止
select
pg_terminate_backend(pid),
query
from
pg_stat_activity
where
query ~* 'ipmp_home_page_status_image'
and pid <> pg_backend_pid();