Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 4614E64FD44 for ; Wed, 17 Dec 2008 10:28:14 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 84958-07 for ; Wed, 17 Dec 2008 10:28:10 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.kickstone.com (smtp.kickstone.com [87.194.183.70]) by mail.postgresql.org (Postfix) with ESMTP id 681C964FD3B for ; Wed, 17 Dec 2008 10:28:10 -0400 (AST) Received: from madras2.square-pi.com ([192.168.2.131] helo=MADRAS2) by mail.kickstone.com with esmtpa (Exim 4.69) (envelope-from ) id 1LCxNf-0003kH-Fb; Wed, 17 Dec 2008 14:28:07 +0000 Message-ID: <742A9D77A1BA4171AF52BBBF6F5F2C75@squarepi.com> From: "John Lister" To: "Tom Lane" Cc: References: <2BB7361E57C4417A975C0474610BA4C3@squarepi.com> <27759.1229521625@sss.pgh.pa.us> Subject: Re: controlling autovacuum during the day. Date: Wed, 17 Dec 2008 14:28:07 -0000 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5512 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=STOX_REPLY_TYPE=0.001 X-Spam-Level: X-Archive-Number: 200812/124 X-Sequence-Number: 30957 > "John Lister" writes: >> I'd like to use autovacuum to clean up the tables rather than schedule a >> full vacuum with cron as it will be more selective/intelligent about what >> gets cleaned. But is it possible to stop it running during peak/office >> hours? > > No. Instead, set the vacuum cost parameters to make it run slow enough > to not interfere too much with your work. Cheers for the quick reply. I've tweaked them quite a bit, but we have quite a few heavily updated tables that i'd like vacuuming to keep them in check. Unfortunately the autovacuum does a FULL vacuum every so often locking the tables for quite a long time, i'd like to move these to the evening if possible. I guess the only option is to add the big tables to the pg_autovacuum table and run a script to enable them in the evening? I guess autovacuum picks up changes to the pg_autovacuum table... Is a global flag something that could be added to a future release? Or is it possible to get the autovacuum/db process to reload the config file while running using pg_reload_conf() for example?