Re: How to write a script to analyze and vacuum all the tables in the system catalog?Thanks.

Поиск
Список
Период
Сортировка
От yxj
Тема Re: How to write a script to analyze and vacuum all the tables in the system catalog?Thanks.
Дата
Msg-id 62ba1f39.2686d.1376033c096.Coremail.leaf_yxj@163.com
обсуждение исходный текст
Ответ на Re: How to write a script to analyze and vacuum all the tables in the system catalog?Thanks.  (Steve Crawford <scrawford@pinpointresearch.com>)
Ответы Re: How to write a script to analyze and vacuum all the tables in the system catalog?Thanks.  (Steve Crawford <scrawford@pinpointresearch.com>)
Список pgsql-general
Hi Steve,
 
Thanks for your reply.
 
My Postgresql version is 8.2. I amn't sure we have the autovacuum job running or not? How can I check it ?
 
Thanks.
 
Grace



At 2012-05-18 02:53:15,"Steve Crawford" <scrawford@pinpointresearch.com> wrote: >On 05/17/2012 11:30 AM, leaf_yxj wrote: >> Hi Guys. Please help me about this. >> >> For postgres database, it looks like we need analyze and vacuum all the >> tables periodly.  I need to write a script which can be executed in crontab. >> I don't have any clues about that. I only know the command : >> analyze tablename; >> vacuum tablename; >Leave off the tablename to do the whole db. But (unless you are on a  >really old version of PG) you really shouldn't need to manually vacuum  >things as that is the job of the autovacuum process. > >There are unusual situations that suggest a manual analyze. It should be  >run right after a cluster for instance. But they are limited special cases. > >What indicates that you need to vacuum or analyze via cron? > >Cheers, >Steve >


В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: How to check for server availability? [v9.3.1, Linux]
Следующее
От: yxj
Дата:
Сообщение: Re: How to debug the performance issues via which system catalog.Thanks.