Skip to main content
Bumped by Community user
replaced http://dba.stackexchange.com/ with https://dba.stackexchange.com/
Source Link

Up to now we used check_postgres.pl to monitor our database.

We used 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.

I was told this in a different question: How to Debug check_postgresqlHow to Debug check_postgresql

A single DML statement can easily obtain millions of locks. There is no relation to the number of statements and the number of locks. But why are 150 locks a bad thing? Unless they are held for a long time (minutes, hours) I don't see any reason to check this.

How can I check for the lock count and ignore all locks which are only N seconds old?

Up to now we used check_postgres.pl to monitor our database.

We used 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.

I was told this in a different question: How to Debug check_postgresql

A single DML statement can easily obtain millions of locks. There is no relation to the number of statements and the number of locks. But why are 150 locks a bad thing? Unless they are held for a long time (minutes, hours) I don't see any reason to check this.

How can I check for the lock count and ignore all locks which are only N seconds old?

Up to now we used check_postgres.pl to monitor our database.

We used 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.

I was told this in a different question: How to Debug check_postgresql

A single DML statement can easily obtain millions of locks. There is no relation to the number of statements and the number of locks. But why are 150 locks a bad thing? Unless they are held for a long time (minutes, hours) I don't see any reason to check this.

How can I check for the lock count and ignore all locks which are only N seconds old?

Bumped by Community user
Bumped by Community user
Source Link
guettli
  • 1.6k
  • 5
  • 24
  • 51

Check lock count for PostgreSQL

Up to now we used check_postgres.pl to monitor our database.

We used 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.

I was told this in a different question: How to Debug check_postgresql

A single DML statement can easily obtain millions of locks. There is no relation to the number of statements and the number of locks. But why are 150 locks a bad thing? Unless they are held for a long time (minutes, hours) I don't see any reason to check this.

How can I check for the lock count and ignore all locks which are only N seconds old?