Re: DB is slow until DB is reloaded - Mailing list pgsql-performance

From Steve Crawford
Subject Re: DB is slow until DB is reloaded
Date
Msg-id 4B429197.7010801@pinpointresearch.com
Whole thread Raw
In response to Re: DB is slow until DB is reloaded  (Madison Kelly <linux@alteeve.com>)
List pgsql-performance
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


pgsql-performance by date:

Previous
From: Madison Kelly
Date:
Subject: Re: DB is slow until DB is reloaded
Next
From: Robert Haas
Date:
Subject: Re: forced sequential scan when condition has current_user