Re: Running vacuum on cron

Поиск
Список
Период
Сортировка
От gateley@jriver.com
Тема Re: Running vacuum on cron
Дата
Msg-id 3BDDA9A2.BEF23B46@jriver.com
обсуждение исходный текст
Ответ на Running vacuum on cron  (Pedro Alves <pmalves@think.co.pt>)
Список pgsql-general
Pedro Alves wrote:
>
>         Hi. Is there any way to put a vacuum and a vacuum analyze (the
> second does everything the first does? Or do I need to use both?) in a cron
> so that it is executed nightly?

Use a crontab entry like:
0 3 * * * /usr/local/bin/psql -d <database> < /.../vacuum_analyze

make sure the crontab owner has permission to do a vacuum analyze.
Change the path of psql as appropriate.
And finally the file /.../vacuum_analyze should contain:
vacuum analyze \g
\q

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

Предыдущее
От: Jean-Michel POURE
Дата:
Сообщение: Re: Running vacuum on cron
Следующее
От: Fran Fabrizio
Дата:
Сообщение: Re: Running vacuum on cron