Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id CF34E6E08E2 for ; Mon, 12 Dec 2011 11:16:27 -0400 (AST) Received: from exprod7og117.obsmtp.com ([64.18.2.6]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Ra7c9-0005BM-R8 for pgsql-performance@postgresql.org; Mon, 12 Dec 2011 15:16:27 +0000 Received: from mail-ee0-f45.google.com ([74.125.83.45]) (using TLSv1) by exprod7ob117.postini.com ([64.18.6.12]) with SMTP ID DSNKTuYavN9PODt+ziRmr5kk/XYNjWSD+01H@postini.com; Mon, 12 Dec 2011 07:16:25 PST Received: by eekb45 with SMTP id b45so1751682eek.32 for ; Mon, 12 Dec 2011 07:16:11 -0800 (PST) Received: by 10.213.19.72 with SMTP id z8mr3643554eba.35.1323702971330; Mon, 12 Dec 2011 07:16:11 -0800 (PST) Received: from [192.168.1.101] (dsl-hkibrasgw2-ff6cc300-200.dhcp.inet.fi. [88.195.108.200]) by mx.google.com with ESMTPS id z54sm76318028eeh.5.2011.12.12.07.16.09 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 12 Dec 2011 07:16:10 -0800 (PST) Message-ID: <4EE61AB8.1010202@enterprisedb.com> Date: Mon, 12 Dec 2011 17:16:08 +0200 From: Heikki Linnakangas User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; fi-FI; rv:1.9.2.24) Gecko/20111114 Icedove/3.1.16 MIME-Version: 1.0 To: Anibal David Acosta CC: pgsql-performance@postgresql.org Subject: Re: autovacuum, exclude table References: <00f501ccb8d9$f07dc4d0$d1794e70$@devshock.com> In-Reply-To: <00f501ccb8d9$f07dc4d0$d1794e70$@devshock.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -4.2 (----) X-Archive-Number: 201112/94 X-Sequence-Number: 45893 On 12.12.2011 16:25, Anibal David Acosta wrote: > I have a couple of tables with about 400millions of records increasing about > 5 millions per day. > > I think that disabling autovac over those tables, and enabling daily manual > vacuum (in some idle hour) will be better. > > I am right? Possibly. If the system is otherwise idle, it sounds sensible to do routine maintenance at that time. > Is possible to exclude autovacuum over some tables? Sure, see http://www.postgresql.org/docs/9.1/static/sql-createtable.html#SQL-CREATETABLE-STORAGE-PARAMETERS ALTER TABLE foo SET (autovacuum_enabled=false, toast.autovacuum_enabled = false); It might be better, though, to let autovacuum enabled, and just do the additional manual VACUUM in the idle period. If the daily manual VACUUM is enough to keep the bloat within the autovacuum thresholds, autovacuum will never kick in. If it's not enough, then you probably want autovacuum to run. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com