Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 0E1429FC5B0 for ; Fri, 1 Jun 2007 17:28: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 72058-09 for ; Fri, 1 Jun 2007 17:28:50 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from pd2mo1so.prod.shaw.ca (shawidc-mo1.cg.shawcable.net [24.71.223.10]) by postgresql.org (Postfix) with ESMTP id 18FBC9FC4F3 for ; Fri, 1 Jun 2007 17:28:53 -0300 (ADT) Received: from pd3mr3so.prod.shaw.ca (pd3mr3so-qfe3.prod.shaw.ca [10.0.141.179]) by l-daemon (Sun ONE Messaging Server 6.0 HotFix 1.01 (built Mar 15 2004)) with ESMTP id <0JIZ00KLZ4V1PJ40@l-daemon> for pgsql-general@postgresql.org; Fri, 01 Jun 2007 14:28:13 -0600 (MDT) Received: from pn2ml5so.prod.shaw.ca ([10.0.121.149]) by pd3mr3so.prod.shaw.ca (Sun Java System Messaging Server 6.2-7.05 (built Sep 5 2006)) with ESMTP id <0JIZ003914V0FRA0@pd3mr3so.prod.shaw.ca> for pgsql-general@postgresql.org; Fri, 01 Jun 2007 14:28:13 -0600 (MDT) Received: from [192.168.0.102] ([24.68.207.184]) by l-daemon (Sun ONE Messaging Server 6.0 HotFix 1.01 (built Mar 15 2004)) with ESMTP id <0JIZ003074V0TK91@l-daemon> for pgsql-general@postgresql.org; Fri, 01 Jun 2007 14:28:12 -0600 (MDT) Date: Fri, 01 Jun 2007 13:27:14 -0700 From: Ron St-Pierre Subject: [Fwd: Re: Autovacuum keeps vacuuming a table disabled in pg_autovacuum] To: general Message-id: <46608122.6010408@shaw.ca> MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7bit User-Agent: Thunderbird 1.5.0.12 (Windows/20070509) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.71 tagged_above=0 required=5 tests=AWL=-1.134, BAYES_50=0.001, DNS_FROM_RFC_POST=1.708, FORGED_RCVD_HELO=0.135 X-Spam-Level: X-Archive-Number: 200706/123 X-Sequence-Number: 114946 I stopped using autovacuum months ago because of similar problems (version 8.1.4). Because we do some major inserts and updates about four times a day, there were a few tables that I didn't want autovacuumed. Even after I turned autovacuum off for these tables it still tried to vacuum them while the updates were running. Instead, I just created cron jobs to vacuum the two tables with the most updates daily, and the one with the most inserts weekly. Performance has been pretty good. Most other tables don't have nearly as many updates, however when I checked the transaction IDs, I see that a problem is creeping closer as we slowly approach the 2 billion mark. imp=# select age(datfrozenxid) from pg_database where datname = 'imp'; age ------------ 1571381411 (1 row) Time to start VACUUM FULL ANALYZE over the weekend. Ron -------- Original Message -------- > select age(datfrozenxid) from pg_database where datname = 'your database' > > 2 billions and you are screwed. Autovacuum starts panicking way before > that, to have enough slack. dbname=# select age(datfrozenxid) from pg_database where datname = 'dbname'; age ------------ 1648762992 (1 row) Sooo... looks like time to quickly upgrade to 8.1 head. Thanks for the help, Csaba. ---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend