X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 90312D1B375 for ; Tue, 3 Aug 2004 15:10:41 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 22107-02 for ; Tue, 3 Aug 2004 18:10:31 +0000 (GMT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by svr1.postgresql.org (Postfix) with ESMTP id 11EFAD1B785 for ; Tue, 3 Aug 2004 13:26:05 -0300 (ADT) Received: from news.hub.org ([200.46.204.72]) by news.hub.org (8.12.9/8.12.9) with ESMTP id i73GN6qb034457 for ; Tue, 3 Aug 2004 16:25:23 GMT (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.12.9/8.12.9/Submit) id i73FtfGh030622 for pgsql-performance@postgresql.org; Tue, 3 Aug 2004 15:55:41 GMT From: Gaetano Mendola X-Newsgroups: comp.databases.postgresql.performance Subject: Re: pg_autovacuum parameters Date: Tue, 03 Aug 2004 17:54:44 +0200 Organization: PYRENET Midi-pyrenees Provider Lines: 49 Message-ID: <410FB544.1010403@bigfoot.com> References: <410F9EF4.1070003@zeut.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@pyrenet.fr To: "Matthew T. O'Connor" User-Agent: Mozilla Thunderbird 0.7.1 (Windows/20040626) X-Accept-Language: en-us, en In-Reply-To: <410F9EF4.1070003@zeut.net> X-Enigmail-Version: 0.84.2.0 X-Enigmail-Supports: pgp-inline, pgp-mime To: pgsql-performance@postgresql.org X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200408/34 X-Sequence-Number: 7670 Matthew T. O'Connor wrote: > Lending, Rune wrote: > >> Hello all. >> >> I am managing a large database with lots of transactions in different >> tables. >> The largest tables have around 5-6 millions tuples and around >> 50000-60000 inserts and maybe 20000 updates pr day. >> While the smalest tables have only a few tuples and a few updates >> /inserts pr day. In addition we have small tables with many >> updates/inserts. So what I am saying is that there is all kinds of >> tables and uses of tables in our database. >> This, I think, makes it difficult to set up pg_autovacuum. I am now >> running vacuum jobs on different tables in cron. >> >> What things should I consider when setting but base and threshold >> values in pg_autovacuum? Since the running of vacuum and analyze is >> relative to the table size, as it must be, I think it is difficult to >> cover all tables.. > > > One of the biggest problems with the version of pg_autovacuum in 7.4 > contrib is that you can only specify one set of thresholds, which often > isn't flexible enough. That said the thresholds are based on table > since since you specify both a base value and a scaling factor so > pg_autovacuum -v 1000 -V 1 will vacuum a table with 100 rows every 200 > updates, but will vacuum a table with 1,000,000 rows every 1,000,100 > updates. > >> Are there anyone who have some thoughts around this? > > > Basically, you should be able to use pg_autovacuum to do most of the > vacuuming, if there are a few tables that aren't getting vacuumed often > enough, then you can add a vacuum command to cron for those specific > tables. And in the version 7.5^H^H^H8.0 ( Tom Lane docet :-) ) I think is possible specify that thresholds per table... Regards Gateano Mendola