Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 42D4D9F9479 for ; Mon, 3 Sep 2007 15:58:18 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 97708-09 for ; Mon, 3 Sep 2007 15:58:12 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from outbound-mail-26.bluehost.com (outbound-mail-26.bluehost.com [69.89.17.191]) by postgresql.org (Postfix) with SMTP id 6C6589F9288 for ; Mon, 3 Sep 2007 15:58:11 -0300 (ADT) Received: (qmail 15134 invoked by uid 0); 3 Sep 2007 18:58:08 -0000 Received: from unknown (HELO box54.bluehost.com) (69.89.20.54) by mailproxy2.bluehost.com with SMTP; 3 Sep 2007 18:58:08 -0000 Received: from vdsl-151-118-147-91.dnvr.qwest.net ([151.118.147.91] helo=new-host.home) by box54.bluehost.com with esmtp (Exim 4.66) (envelope-from ) id 1ISH7e-00056Q-Dr for pgsql-admin@postgresql.org; Mon, 03 Sep 2007 12:58:06 -0600 From: Kevin Kempter To: pgsql-admin@postgresql.org Subject: Re: transaction ID query Date: Mon, 3 Sep 2007 12:54:51 -0600 User-Agent: KMail/1.9.7 References: <200708300647.36023.kevin@kevinkempterllc.com> <20070830131248.GB5872@alvh.no-ip.org> In-Reply-To: <20070830131248.GB5872@alvh.no-ip.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200709031254.52150.kevin@kevinkempterllc.com> X-Identified-User: {840:box54.bluehost.com:kevinkem:kevinkempterllc.com} {sentby:bopbeforesmtp 151.118.147.91 authed with kevinkempterllc.com} X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200709/14 X-Sequence-Number: 26775 On Thursday 30 August 2007 07:12:48 Alvaro Herrera wrote: > Kevin Kempter wrote: > > Hi List; > > > > can I run queries to see the following for postgres v 8.1.4: > > Update to 8.1.9 *soon* unless you want to be victim of a nasty autovac > bug. And in case you already were (which you won't know until your > database starts causing you hard-to-fix headaches), I suggest you > connect to template0 and run VACUUM FREEZE for precaution. > > > a) where the db is per used transaction ID's (want to avoid a transaction > > ID wrap-around scenario) > > select age(datfrozenxid) from pg_database; > > > b) a list of tables in the db and the last time they were vacuumed > > Examine the pg_stat views, though I am not sure if the vacuum columns > were already in 8.1. In any case, in 8.1 Xid wraparound is tracked > per-database, so you need database-wide vacuums. In 8.2 it is per table > so it is easier to keep up tokempt date. I've run a vacuum verbose on the entire database (actually on all db's within the cluster) but now I still see large numbers for the following query. Am I missing something? Are these db's still in danger of a tx ID wrap-around failure? ems-1=# select datname, age(datfrozenxid) from pg_database; datname | age -------------+------------ postgres | 1083972950 rbc | 1083972554 emsam-1-old | 1085384465 template1 | 1083966365 template0 | 1195263818 ems-1 | 1086979868 Thanks in advance... /Kevin