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 D65299FA621 for ; Fri, 18 Aug 2006 12:18:39 -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 61688-08 for ; Fri, 18 Aug 2006 12:18:31 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from wolff.to (wolff.to [66.93.197.194]) by postgresql.org (Postfix) with SMTP id 7B24F9FA4F0 for ; Fri, 18 Aug 2006 12:18:31 -0300 (ADT) Received: (qmail 25630 invoked by uid 500); 18 Aug 2006 15:25:48 -0000 Date: Fri, 18 Aug 2006 10:25:48 -0500 From: Bruno Wolff III To: Joel Stevenson Cc: pgsql-admin@postgresql.org Subject: Re: vacuumdb exclude tables option? Message-ID: <20060818152548.GA24101@wolff.to> Mail-Followup-To: Bruno Wolff III , Joel Stevenson , pgsql-admin@postgresql.org References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.181 tagged_above=0 required=5 tests=AWL, SARE_MILLIONSOF X-Spam-Level: X-Archive-Number: 200608/221 X-Sequence-Number: 22764 On Wed, Aug 09, 2006 at 11:24:03 -0700, Joel Stevenson wrote: > I have a database that includes both highly transactional tables and > archive tables - OLTP and OLAP mixed together. Some of the archival > tables, which only experience inserts and reads, not updates or > deletes, contain many millions of rows and so they take a *long* time > to vacuum. Is there currently any means to exclude only these tables > from vacuumdb operations other than explicitly vacuuming all the > other tables and explicity skipping the archival tables? Take a look at: http://developer.postgresql.org/docs/postgres/routine-vacuuming.html#AUTOVACUUM There will be a way to have per table settings in 8.2, though the interface for setting things up is klunky. I also seem to remember some discussion about having a separate transaction for each table being cleaned as a new feature. This helps with some other problems. There will still be an issue if you mix some long running queries with frequent updates in the same database, as the long running queries can prevent recovering a lot of rows in frequently updated tables. I have seen discussions of people brainstorming about this problem, but I don't remember anyone coming up with a great solution.