pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jim C. Nasby <jnasby@pervasive.com>
To: Tony Wasson <ajwasson@gmail.com>
Cc: Vivek Khera <vivek@khera.org>
Cc: Pgsql performance <pgsql-performance@postgresql.org>
Subject: Re: postgresql transaction id monitoring with nagios
Date: Tue, 2 May 2006 16:46:37 -0500
Message-ID: <20060502214637.GH97354@pervasive.com> (raw)
In-Reply-To: <6d8daee30605021206h8170a48w94670b5d23633a72@mail.gmail.com>
References: <6d8daee30605021126o7b44e255q552dcdc676c565bf@mail.gmail.com>
	<628A837A-9718-46BB-85D7-8A63BBB1CA32@khera.org>
	<6d8daee30605021206h8170a48w94670b5d23633a72@mail.gmail.com>

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



view thread (10+ messages)

Message-ID: <20060502214637.GH97354@pervasive.com>
Permalink:  ../20060502214637.GH97354@pervasive.com/
Also on:    postgresql.org/message-id/20060502214637.GH97354@pervasive.com

 · 

reply

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-performance@postgresql.org
  Cc: jnasby@pervasive.com, ajwasson@gmail.com, vivek@khera.org
  Subject: Re: postgresql transaction id monitoring with nagios
  In-Reply-To: <20060502214637.GH97354@pervasive.com>

* 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