X-Original-To: pgsql-admin-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id A253E9FB3B6 for ; Wed, 6 Sep 2006 18:18:22 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 82329-02 for ; Wed, 6 Sep 2006 18:18:17 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from exchange.g2switchworks.com (mail.g2switchworks.com [63.87.162.25]) by postgresql.org (Postfix) with ESMTP id E9F4C9FB3A6 for ; Wed, 6 Sep 2006 18:18:17 -0300 (ADT) Received: from 10.10.1.37 ([10.10.1.37]) by exchange.g2switchworks.com ([10.10.1.2]) with Microsoft Exchange Server HTTP-DAV ; Wed, 6 Sep 2006 21:18:16 +0000 Received: from state.g2switchworks.com by mail.g2switchworks.com; 06 Sep 2006 16:18:16 -0500 Subject: Re: transactoin id wraparound problem From: Scott Marlowe To: Sriram Dandapani Cc: Tom Lane , pgsql-admin@postgresql.org In-Reply-To: <6992E470F12A444BB787B5C937B9D4DF05ABC8C7@ca-mail1.cis.local> References: <6992E470F12A444BB787B5C937B9D4DF05ABC8C7@ca-mail1.cis.local> Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1157577495.20424.29.camel@state.g2switchworks.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Wed, 06 Sep 2006 16:18:16 -0500 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.097 tagged_above=0 required=5 tests=AWL, SPF_PASS, UNPARSEABLE_RELAY X-Spam-Level: X-Archive-Number: 200609/55 X-Sequence-Number: 22969 On Wed, 2006-09-06 at 16:06, Sriram Dandapani wrote: > Curious why autovacuum does not handle this problem. Here are my > settings > > max_fsm_pages = 2000000 > > autovacuum = on # enable autovacuum > > autovacuum_naptime = 300 # time between autovacuum runs, > in > > autovacuum_vacuum_threshold = 10000 # min # of tuple updates before > # vacuum > autovacuum_analyze_threshold = 1500 # min # of tuple updates before > # analyze > autovacuum_vacuum_scale_factor = 0.4 # fraction of rel size before > # vacuum > autovacuum_analyze_scale_factor = 0.2 # fraction of rel size before > # analyze > autovacuum_vacuum_cost_delay = 100 > > autovacuum_vacuum_cost_limit = 1000 > > > The database has a constant rate of about 50-100G a day of data flowing > in which gets deleted after 2 days.(this cycle keeps repeating). There > are historical tables that grow at a rate of 2G-4G a day The most common cause of these problems is that you have long standing transactions that never get closed. Look for some connection to the database(s) (any of them) that are never committed or rolled back. One "idle in transaction" connection from one program can cause this problem. If you're doing your updates and / or deletes individually instead of in transactional batches that will just make it worse.