Re: DB is slow until DB is reloaded

Поиск
Список
Период
Сортировка
От Steve Crawford
Тема Re: DB is slow until DB is reloaded
Дата
Msg-id 4B429197.7010801@pinpointresearch.com
обсуждение исходный текст
Ответ на Re: DB is slow until DB is reloaded  (Madison Kelly <linux@alteeve.com>)
Список 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 по дате отправления:

Предыдущее
От: Madison Kelly
Дата:
Сообщение: Re: DB is slow until DB is reloaded
Следующее
От: Robert Haas
Дата:
Сообщение: Re: forced sequential scan when condition has current_user