[check_postgres] Checking PostgreSQL lock count
Thomas Güttler
guettliml at thomas-guettler.de
Thu Dec 17 13:38:52 UTC 2015
Hi
We use check_postgres.pl to monitor our database.
We use this to check the count of the locks:
https://bucardo.org/check_postgres/check_postgres.pl.html#locks
We often see more than 150 locks.
The question was: What is going on? We patched the script to output this sql statement, if the lock count was exceeded:
select * from pg_stat_activity order by datname
Unfortunately the result is not what I was expecting. Although there are more than 150 locks, pg_stat_activity shows
only few (less then 10) queries.
This has happened about twice a day during the last days, and every time only few lines where returned by pg_stat_activity.
What is going on here?
How can I further debug where these locks come from?
BTW, same question here:
http://dba.stackexchange.com/questions/123945/checking-postgresql-lock-count-with-check-postgres-pl
--
Thomas Guettler http://www.thomas-guettler.de/
More information about the Check_postgres
mailing list