X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id D83C79DC94A for ; Mon, 13 Mar 2006 13:41:39 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 05018-09 for ; Mon, 13 Mar 2006 13:41:38 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mx1.surnet.cl (mx1.surnet.cl [216.155.73.180]) by postgresql.org (Postfix) with ESMTP id 3B37B9DC864 for ; Mon, 13 Mar 2006 13:41:36 -0400 (AST) Received: from unknown (HELO cluster.surnet.cl) ([216.155.73.165]) by mx1.surnet.cl with ESMTP; 13 Mar 2006 13:41:36 -0400 X-IronPort-AV: i="4.02,187,1139194800"; d="scan'208"; a="46120758:sNHT19893516" Received: from alvh.no-ip.org (201.221.200.21) by cluster.surnet.cl (7.0.043) (authenticated as alvherre@surnet.cl) id 43A978FD00A2D0DD; Mon, 13 Mar 2006 13:41:36 -0400 Received: by alvh.no-ip.org (Postfix, from userid 1000) id F3260C3A2BE; Mon, 13 Mar 2006 13:41:35 -0400 (CLT) Date: Mon, 13 Mar 2006 13:41:35 -0400 From: Alvaro Herrera To: "Craig A. James" Cc: pgsql-performance@postgresql.org Subject: Re: No vacuum for insert-only database? Message-ID: <20060313174135.GA16213@surnet.cl> Mail-Followup-To: "Craig A. James" , pgsql-performance@postgresql.org References: <44158989.6020103@modgraph-usa.com> <20060313150949.GK8274@surnet.cl> <4415A9A4.5020903@modgraph-usa.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4415A9A4.5020903@modgraph-usa.com> User-Agent: Mutt/1.5.11+cvs20060126 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=1.555 required=5 tests=[AWL=-0.364, DNS_FROM_RFC_ABUSE=0.479, DNS_FROM_RFC_POST=1.44] X-Spam-Score: 1.555 X-Spam-Level: * X-Archive-Number: 200603/165 X-Sequence-Number: 17602 Craig A. James wrote: > Alvaro Herrera wrote: > >>If I only insert data into a table, never update or delete, then I should > >>never have to vacuum it. Is that correct? > > > >You still need to vacuum eventually, to avoid transaction Id wraparound > >issues. But not as often. > > Thanks. Any suggestions for what "not as often" means? For example, if my > database will never contain more than 10 million rows, is that a problem? > 100 million rows? When does transaction ID wraparound become a problem? Transaction ID wraparound will be a problem at a bit less than 2 billion transactions. So if you vacuum the table every 1 billion transactions you are safe. I suggest you read the "routine maintenance" section in the docs; the wraparound issue is explained there. -- Alvaro Herrera http://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support