Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 538539FB4F8 for ; Thu, 30 Aug 2007 10:12:59 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 75671-07-2 for ; Thu, 30 Aug 2007 10:12:46 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from lists.commandprompt.com (host-254.commandprompt.net [207.173.203.254]) by postgresql.org (Postfix) with ESMTP id 512489FA248 for ; Thu, 30 Aug 2007 10:12:53 -0300 (ADT) Received: from perhan.alvh.no-ip.org (201-220-104-109.bk9-dsl.surnet.cl [201.220.104.109]) (authenticated bits=0) by lists.commandprompt.com (8.13.7/8.13.6) with ESMTP id l7UDCoMG029271; Thu, 30 Aug 2007 06:12:51 -0700 Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 4798847C5F; Thu, 30 Aug 2007 09:12:48 -0400 (CLT) Date: Thu, 30 Aug 2007 09:12:48 -0400 From: Alvaro Herrera To: Kevin Kempter Cc: pgsql-admin@postgresql.org Subject: Re: transaction ID query Message-ID: <20070830131248.GB5872@alvh.no-ip.org> References: <200708300647.36023.kevin@kevinkempterllc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200708300647.36023.kevin@kevinkempterllc.com> User-Agent: Mutt/1.5.16 (2007-06-11) X-Virus-Scanned: ClamAV 0.91.1/4107/Wed Aug 29 09:16:42 2007 on projects.commandprompt.com X-Virus-Status: Clean X-Greylist: Sender succeded SMTP AUTH authentication, not delayed by milter-greylist-1.6 (lists.commandprompt.com [192.168.2.159]); Thu, 30 Aug 2007 06:12:51 -0700 (PDT) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200708/410 X-Sequence-Number: 26741 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 to date. -- Alvaro Herrera http://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support