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 9C3779FB2C4 for ; Wed, 9 Aug 2006 15:28:23 -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 27679-01 for ; Wed, 9 Aug 2006 15:28:20 -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 62D739FB2C2 for ; Wed, 9 Aug 2006 15:28:18 -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, 9 Aug 2006 18:28:17 +0000 Received: from state.g2switchworks.com by mail.g2switchworks.com; 09 Aug 2006 13:28:17 -0500 Subject: Re: vacuumdb exclude tables option? From: Scott Marlowe To: Joel Stevenson Cc: pgsql-admin@postgresql.org In-Reply-To: References: Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1155148097.20252.106.camel@state.g2switchworks.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Wed, 09 Aug 2006 13:28:17 -0500 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.266 tagged_above=0 required=5 tests=AWL, SARE_MILLIONSOF, SPF_PASS, UNPARSEABLE_RELAY X-Spam-Level: X-Archive-Number: 200608/120 X-Sequence-Number: 22663 On Wed, 2006-08-09 at 13:24, Joel Stevenson wrote: > Hi, > > 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? > > If not, are there any plans to add a command line switch to vacuumdb > to exclude tables from it's operation, ala 'vacuumdb -d mytest -x > archive_tab1 -x archive_tab2 -x archive_tab3'? I searched the list > archives but didn't see anything about being able to do this. > Something like this would save many hours of useless vacuuming in > this particular setup. Does autovacuum fail you in this quest? I've found it's pretty good about leaving along tables that don't need vacuuming. It's usually the other way around that people have problems with, autovacuum NOT vacuuming tables that need vacuuming often enough.