Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 5306C9F93A4 for ; Mon, 14 May 2007 19:16:35 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 74842-02 for ; Mon, 14 May 2007 19:16:24 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from lists.commandprompt.com (host-254.commandprompt.net [207.173.203.254]) by postgresql.org (Postfix) with ESMTP id AC93A9FB853 for ; Mon, 14 May 2007 19:16:25 -0300 (ADT) Received: from perhan.alvh.no-ip.org (201-221-217-243.bk12-dsl.surnet.cl [201.221.217.243]) (authenticated bits=0) by lists.commandprompt.com (8.13.7/8.13.6) with ESMTP id l4EMGOn6023372; Mon, 14 May 2007 15:16:25 -0700 Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id ADCE732A13; Mon, 14 May 2007 18:16:19 -0400 (CLT) Date: Mon, 14 May 2007 18:16:19 -0400 From: Alvaro Herrera To: Chris Browne Cc: pgsql-patches@postgresql.org Subject: Re: [DOCS] Autovacuum and XID wraparound Message-ID: <20070514221619.GC8916@alvh.no-ip.org> References: <20070514011740.GH14860@fetter.org> <23394.1179108400@sss.pgh.pa.us> <1179117269.6047.3.camel@goldbach> <60sl9z6tln.fsf@dba2.int.libertyrms.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <60sl9z6tln.fsf@dba2.int.libertyrms.com> User-Agent: Mutt/1.5.13 (2006-08-11) X-Virus-Scanned: ClamAV version 0.88.5, clamav-milter version 0.88.5 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]); Mon, 14 May 2007 15:16:25 -0700 (PDT) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200705/202 X-Sequence-Number: 2302 Chris Browne wrote: > Would the following 'maintenance' regimen be truly safe against XID > wraparound: > > - Most tables are being vacuumed regularly, so that > pg_class.relfrozenxid is kept "safe." > > - There are some tables that periodically get TRUNCATEd so that, in > principle, they never need to be vacuumed. > > Is it actually true that we'd never need to vacuum those tables > (assuming 8.2+)? I suppose it would be rather cheap to VACUUM > immediately after the TRUNCATE... You'd need to vacuum after the truncate. It would be pretty cheap, the tables being empty. I suppose it would be pretty trivial to set the relfrozenxid to RecentXmin or something during TRUNCATE. -- Alvaro Herrera http://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc.