once in a while our database server get's terrible overloaded, cause people are running thousands of long running queries against it.
1. How to find out who is generating queries:
select datname, client_addr from pg_stat_activity;
2. Killing queries from a specific IP:
select pg_terminate_backend(procpid) from pg_stat_activity where client_addr='IP';
This can be done as postgres user.
April + May
6 years ago
No comments:
Post a Comment