查询相关表当前的活动进程:
SELECT * FROM pg_stat_activity where query ~ ‘table_name‘;
SELECT pg_terminate_backend(pid) FROM pg_stat_activity where query ~ ‘table_name‘ and pid <> pg_backend_pid();
时间: 2024-10-26 14:47:28
查询相关表当前的活动进程:
SELECT * FROM pg_stat_activity where query ~ ‘table_name‘;
SELECT pg_terminate_backend(pid) FROM pg_stat_activity where query ~ ‘table_name‘ and pid <> pg_backend_pid();