Re: auto-vacuum questions

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: auto-vacuum questions
Дата
Msg-id 20080508145432.GC5515@alvh.no-ip.org
обсуждение исходный текст
Ответ на auto-vacuum questions  (John Gateley <gateley@jriver.com>)
Ответы Re: auto-vacuum questions
Список pgsql-general
John Gateley wrote:
> Hi, I have a couple of questions on the auto-vacuum daemon:
>
> 1) How do I know it is running. I suspect it has not been, and
> I carefully checked the documentation and found a variable that
> wasn't set (stats_row_level defaults to off in 8.1, should be
> "on"). So I changed that and restarted, but how do I *know* that
> is or isn't vacuuming?

Open a session and run "SHOW autovacuum".  If it says "on", it's
vacuuming.  Keep an eye on the autovacuum_naptime setting too.

> 2) Every night I do
>
> pg_dump -c mydb | psql -d mydbtest
>
> so I create a copy of the database in a different name for testing
> purposes. But the new database, mydbtest, always has slow queries.
> I run an analyze and they speed up. There are NO transactions in
> mydbtest until I come in and start testing, does this mean
> auto-vacuum won't analyze it? Is this maybe related to question
> 1 where I think auto-vacuum actually wasn't running?

It might mean it hasn't been analyzed _yet_.  If there are too many
databases, it may take a while.

--
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

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

Предыдущее
От: John Gateley
Дата:
Сообщение: auto-vacuum questions
Следующее
От: John Gateley
Дата:
Сообщение: Re: auto-vacuum questions