X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 52C2D9FB1F0 for ; Tue, 2 May 2006 18:46:48 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 58425-01 for ; Tue, 2 May 2006 18:46:40 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from noel.decibel.org (noel.decibel.org [67.100.216.10]) by postgresql.org (Postfix) with ESMTP id 981069FB1D3 for ; Tue, 2 May 2006 18:46:40 -0300 (ADT) Received: by noel.decibel.org (Postfix, from userid 1001) id C854B5643A; Tue, 2 May 2006 16:46:38 -0500 (CDT) Received: (hashcash-sendmail, from uid 1001); Tue, 2 May 2006 16:46:37 -0500 Date: Tue, 2 May 2006 16:46:37 -0500 From: "Jim C. Nasby" To: Tony Wasson Cc: Vivek Khera , Pgsql performance Subject: Re: postgresql transaction id monitoring with nagios Message-ID: <20060502214637.GH97354@pervasive.com> References: <6d8daee30605021126o7b44e255q552dcdc676c565bf@mail.gmail.com> <628A837A-9718-46BB-85D7-8A63BBB1CA32@khera.org> <6d8daee30605021206h8170a48w94670b5d23633a72@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6d8daee30605021206h8170a48w94670b5d23633a72@mail.gmail.com> X-Operating-System: FreeBSD 6.0-RELEASE-p4 amd64 X-Distributed: Join the Effort! http://www.distributed.net User-Agent: Mutt/1.5.11 X-Hashcash: 1:20:060502:ajwasson@gmail.com::4qE1bIQP1iU8VowT:0000000000000000000 0000000000000000000000000LwA X-Hashcash: 1:20:060502:vivek@khera.org::ct/cWXkuuI2wwT4d:0089D4 X-Hashcash: 1:20:060502:pgsql-performance@postgresql.org::QxvCjDRGYLiN8pvV:00000 00000000000000000000000053jZ X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/51 X-Sequence-Number: 18838 On Tue, May 02, 2006 at 12:06:30PM -0700, Tony Wasson wrote: > Ah thanks, it's a bug in my understanding of the thresholds. > > "With the standard freezing policy, the age column will start at one > billion for a freshly-vacuumed database." > > So essentially, 1B is normal, 2B is the max. The logic is now.. > > The script detects a wrap at 2 billion. It starts warning once one or > more databases show an age over 1.5 billion transactions. It reports > critical at 1.75B transactions. > > If anyone else understands differently, hit me with a clue bat. You should take a look at the code in -HEAD that triggers autovacuum to do a XID-wrap-prevention vacuum, as well as the code that warns that we're approaching wrap. From memory, the limit for the later is max_transactions << 3 Where max_transactions should be 4B on most platforms. I'm intending to submit a patch to clean some of that code up (put all the thresholds in one .h file rather than how they're spread through source code right now); if you drop me an email off-list I'll send you info once I do that. -- Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com Pervasive Software http://pervasive.com work: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461