Received: from localhost (pluto.hub.org [200.46.204.4]) by postgresql.org (Postfix) with ESMTP id 71A799F9ED0 for ; Thu, 2 Nov 2006 06:49:45 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.4]) (amavisd-new, port 10024) with ESMTP id 58207-09 for ; Thu, 2 Nov 2006 06:49:38 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail01.enterprisedb.com (mail01.enterprisedb.com [63.246.7.168]) by postgresql.org (Postfix) with ESMTP id 2C94A9F976E for ; Thu, 2 Nov 2006 06:49:42 -0400 (AST) thread-index: Acb+bJobK+Y+lZ+7S6O38WYUcYUJ0w== Received: from [192.168.0.31] ([82.133.64.220]) by mail01.enterprisedb.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 2 Nov 2006 05:49:41 -0500 Subject: Re: Database-wide vacuum can take a long time, duringwhich tables are not being analyzed Content-Class: urn:content-classes:message Importance: normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.2757 From: "Simon Riggs" To: "Steven Flatt" Cc: In-Reply-To: <357fa7590611011115q748ddce9qa6cf570ec2f15348@mail.gmail.com> References: <357fa7590611011115q748ddce9qa6cf570ec2f15348@mail.gmail.com> Content-Type: text/plain; charset="iso-8859-1" Date: Thu, 02 Nov 2006 10:49:18 +0000 Message-ID: <1162464559.3587.291.camel@silverbirch.site> MIME-Version: 1.0 X-Mailer: Evolution 2.6.0 Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 02 Nov 2006 10:49:41.0828 (UTC) FILETIME=[99E1E840:01C6FE6C] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200611/17 X-Sequence-Number: 21787 On Wed, 2006-11-01 at 14:15 -0500, Steven Flatt wrote: > Here is a potential problem with the auto-vacuum daemon, and I'm > wondering if anyone has considered this. To avoid transaction ID > wraparound, the auto-vacuum daemon will periodically determine that it > needs to do a DB-wide vacuum, which takes a long time. On our system, > it is on the order of a couple of weeks. (The system is very busy and > there is a lot of I/O going on pretty much 24/7). During this period > of time, there is nothing to automatically analyze any of the tables, > leading to further performance problems. What are your thoughts on > having the DB-wide vacuum running on a separate thread so that the > daemon can concurrently wake up and take care of analyzing tables? Yes, do it. Every couple of weeks implies a transaction rate of ~~500tps, so I'd be interested to hear more about your system. -- Simon Riggs EnterpriseDB http://www.enterprisedb.com