Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 45060634166 for ; Mon, 4 Jan 2010 21:13:04 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 15421-03-6 for ; Tue, 5 Jan 2010 01:12:53 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from polaris.pinpointresearch.com (66-7-238-130.static-ip.telepacific.net [66.7.238.130]) by mail.postgresql.org (Postfix) with ESMTP id 9359B633D08 for ; Mon, 4 Jan 2010 21:10:49 -0400 (AST) Received: from betelgeuse.pinpointresearch.com (betelgeuse.pinpointresearch.com [192.168.1.179]) by polaris.pinpointresearch.com (Postfix) with ESMTP id 80600E01203F; Mon, 4 Jan 2010 17:10:47 -0800 (PST) Message-ID: <4B429197.7010801@pinpointresearch.com> Date: Mon, 04 Jan 2010 17:10:47 -0800 From: Steve Crawford User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 To: Madison Kelly CC: Rosser Schwarz , Brad Nicholson , Gary Doades , pgsql-performance@postgresql.org Subject: Re: DB is slow until DB is reloaded References: <4B423D22.7040803@alteeve.com> <4B424215.70605@pinpointresearch.com> <4B424FF6.40207@alteeve.com> <4B425222.7070905@gpdnet.co.uk> <4B425555.6020709@alteeve.com> <1262638856.29852.4.camel@bnicholson-desktop> <4B425E93.1050207@alteeve.com> <4B426359.9040601@pinpointresearch.com> <4B426438.40109@alteeve.com> <37d451f71001041406i3f5d8d5fte8a29cfbc06998c9@mail.gmail.com> <4B428917.3020305@alteeve.com> In-Reply-To: <4B428917.3020305@alteeve.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=3.189 tagged_above=-10 required=5 tests=BAYES_50=0.001, FH_DATE_PAST_20XX=3.188 X-Spam-Level: *** X-Archive-Number: 201001/33 X-Sequence-Number: 36913 Madison Kelly wrote: > > You are right, autovacuum is not running after all. From your comment, > I am wondering if you'd recommend I turn it on or not?... > > I see you are considering an upgrade but FWIW on your 8.1 instance, my remaining 8.1 server has been running for years with it on. Read up on it at: http://www.postgresql.org/docs/8.1/static/maintenance.html#AUTOVACUUM Basically you need to turn on some stats stuff so autovacuum can determine when to run (in postgresql.conf): stats_start_collector = on stats_row_level = on And you need to enable autovacuum (in postgresql.conf): autovacuum = on autovacuum_naptime = 300 # time between autovacuum runs, in secs Then you can tune it if you need to but at least it will be looking for things that are vacuumworthy every 5 minutes. Cheers, Steve