Good day everyone....

I would like to ask a question when determining the amount of
locks on a postgresql database.

Currently we are monitoring over 100 Postgresql databases and
one of the things we monitor is the database locks.

On all the systems the amount of locks is not that high, however
the most busy and production server always have over 500 locks.

Upon investigation, it seems that all the locks reported are
access share locks which from what I understand will be there due to the
amount of reads from the database.

Currently we are using the following method to retrieve the
amount of database locks :

for i in `psql -t -c "select datname from pg_catalog.pg_database
d" | grep -v template0 | grep -v template1`; do
--action=locks --db=$i ; done is the monitoring tool we donwloaded in
order to assist in monitoring the databases and we are also planning to
use this within the nagios setup soon.

I would like to know whether someone has a better way of
retrieving the amount of locks which are truly critical to monitor or
perhaps even a way to exclude the access share locks from this.

Thank you in advance for any assistance.


Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppgsql-novice @
postedSep 7, '10 at 9:54a
activeSep 7, '10 at 9:54a

1 user in discussion

Machiel Richards: 1 post



site design / logo © 2022 Grokbase