-- 事务 SELECT (SELECTsum(xact_commit) +sum(xact_rollback) AS "Total" FROM pg_stat_database), (SELECTsum(xact_commit) AS "Commit" FROM pg_stat_database), (SELECTsum(xact_rollback) AS "Rollback" FROM pg_stat_database)
查询并杀掉某个表的正在执行的sql进程并杀掉
select pg_terminate_backend(pid), query from pg_stat_activity where query ~* 'ipmp_home_page_status_image' and pid <> pg_backend_pid();