Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZKoDK-0002TL-0j for pgsql-admin@arkaria.postgresql.org; Thu, 30 Jul 2015 13:49:38 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZKoDJ-0005vb-Jc for pgsql-admin@arkaria.postgresql.org; Thu, 30 Jul 2015 13:49:37 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZKoDI-0005tb-Gi for pgsql-admin@postgresql.org; Thu, 30 Jul 2015 13:49:36 +0000 Received: from mout.gmx.net ([212.227.17.20]) by makus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.84) (envelope-from ) id 1ZKoDE-0007hN-Qi for pgsql-admin@postgresql.org; Thu, 30 Jul 2015 13:49:35 +0000 Received: from auth2-smtp.messagingengine.com ([66.111.4.228]) by mail.gmx.com (mrgmx101) with ESMTPSA (Nemesis) id 0LlqNY-1YlkVe41q4-00ZMN4 for ; Thu, 30 Jul 2015 15:49:31 +0200 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailauth.nyi.internal (Postfix) with ESMTP id 48C342091A for ; Thu, 30 Jul 2015 09:49:29 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute5.internal (MEProxy); Thu, 30 Jul 2015 09:49:29 -0400 X-Sasl-enc: uiD/AQXMU2sXA0FTRzsGjKNwuRWy57dKTVe1aOhEnM71 1438264169 Received: from [192.168.1.186] (unknown [204.145.120.11]) by mail.messagingengine.com (Postfix) with ESMTPA id 107FF680185; Thu, 30 Jul 2015 09:49:29 -0400 (EDT) Message-ID: <55BA2B68.6010902@gmx.net> Date: Thu, 30 Jul 2015 09:49:28 -0400 From: Peter Eisentraut User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Renato Oliveira , Forums postgresql , "pgsql-admin@postgresql.org" Subject: Re: How Many PG_Locks are considered too many References: <387405ED5B94BF42B91A9AB5BB14498E53A61241@ccpexch05.cantab.local> In-Reply-To: <387405ED5B94BF42B91A9AB5BB14498E53A61241@ccpexch05.cantab.local> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:mP9PxlE9e7NstDGgYK5Rbh8T365y/vAfMeeuuWyxpEnnmv1gJxe MB6z/ex4c5Haq/FLBWp+tf3ZKdhDHjC2jQlI2FK/HRfba540EpLKGDWXJLA0ZJ+fb4qxqPA Z6gzRB/NXPSUXr8rFotf9sxIIhhU8ECfetT2nXsWV4GxvwCHLyO0dgUGlDGPPcHwhQzSVkb 37fZCXiPcX1duUYj5YoZA== X-UI-Out-Filterresults: notjunk:1;V01:K0:3iE5iGQV/+0=:3V5E2Rejwthxe98gjVY6h8 7+6ogKoxNfySLxFTvSLpM0ysgkTn/P6IW3qOdFBMrFwoVGH8U+3YUg0/mdNkZdYqnmX6e752G AVm2Yv33bWdMXeybk3W/K0QFExlL3f6lSkd1ep8c6iQPXRosei6cxcWTaEFItt77BLqvYshqn xczKp7ntz8wyQ4Blfskdi2Sa5GEfZ73SxNxngKitapVnfHEjbkUtFDijlI0tlEu+G43AtjbR3 Hg1Y9NtN8IrgMW+Wihm1ENlXY1LQeZkpy81J8L5r3GWkornb0Jsf+L2L/4R2Tysy60qlBb17C taZtag0RbWjtlaJXrJtqNu9l9rPEfmSJQrRl6WuR5UXCwJ5yAxxBHG5jT1QhFvHLYsqhY08n7 LWwf1rQOqlfEwV8gz6Cibh9O9ycM8rSE4CYc55SZq6F7icErcTVG50H7K8ZaCdblRmZYCXJ6/ h2/UsnymItc7VJZZ96sIHMNoaiDcPBx8oybSZ+S9/nYw+QwTLdQ5dIGIK6TQZS7Q8uk89ggCP CNPw6u//gzxV4lOQcOAtRjEyjaUcZiIE1oBiG6CD5O7Ud/C+6onE3KfVF/r9HI8Z0QJ88UwRA cfjhvNW5mIWA583+8i3XSF7hKxORPtXjznPA1vzsrS9PHylN9ybMUozgpORLqQw4cETG9AISV sZHTFm883ihyMfNx0o0k2hPLjMDXSPVIVjRPaYiY4YMxqZGqYxD03uiffE+78R6yidAM= X-Pg-Spam-Score: -4.0 (----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org 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