From: Peter Eisentraut <peter_e@gmx.net>
To: Renato Oliveira <Renato.Oliveira@cantabcapital.com>
To: Forums postgresql <pgsql-general@postgresql.org>
To: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: Re: How Many PG_Locks are considered too many
Date: Thu, 30 Jul 2015 09:49:28 -0400
Message-ID: <55BA2B68.6010902@gmx.net> (raw)
In-Reply-To: <387405ED5B94BF42B91A9AB5BB14498E53A61241@ccpexch05.cantab.local>
References: <387405ED5B94BF42B91A9AB5BB14498E53A61241@ccpexch05.cantab.local>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>
On 7/30/15 6:13 AM, Renato Oliveira wrote:
> We have a Nagios plugin, which monitors pg_locks and almost daily we see
> 3000 to 40000 pg_locks.
>
> Can we just ignore them, can we let them grow without worrying?
>
> How many pg_locks are considered unsafe for any given postgres server?
That depends on how many concurrent clients you have and what they are
doing. Every table access will at least create a share lock of some
kind, so if you have a lot of activity that does a lot of things, you
will see a lot of locks, but that doesn't impact database performance in
a significant way.
I don't think monitoring the absolute number of locks is useful. You
might want to chart it, to compare over time. If you want to monitor
locks, you could monitor lock waits, which you can get by checking the
server log.
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: peter_e@gmx.net, Renato.Oliveira@cantabcapital.com, pgsql-general@postgresql.org
Subject: Re: How Many PG_Locks are considered too many
In-Reply-To: <55BA2B68.6010902@gmx.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox