Re: Finetuning Autovacuum

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Finetuning Autovacuum
Дата
Msg-id 20100105034029.GR3778@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: Finetuning Autovacuum  (Scott Marlowe <scott.marlowe@gmail.com>)
Ответы Re: Finetuning Autovacuum  ("Benjamin Krajmalnik" <kraj@illumen.com>)
Re: Finetuning Autovacuum  ("Benjamin Krajmalnik" <kraj@illumen.com>)
Список pgsql-admin
Scott Marlowe escribió:
> On Mon, Jan 4, 2010 at 6:38 PM, Benjamin Krajmalnik <kraj@illumen.com> wrote:

> > Initially, I had scheduled tasks through pgagent running a vacuum analyze
> > every 15 minutes, but other posts I have read here have stated this could
> > cause deadlocks, and mentioned running autovacuum is preferable
>
> Autovacuum is just a daemon that calls vacuum (regular) for you, so if
> regular vacuum could cause deadlocks then so could autovacuum.

FWIW there are some smarts in the deadlock detection code that prefer to
kill autovacuum if it is blocking some other process (even if it doesn't
cause a deadlock -- just blocking a user process is enough).  This does
not occur with user invoked vacuum, so there indeed can be a difference
here.  Note that this means that if you have an operation somewhere that
wants to get a lock that conflicts with vacuum all the time, it could be
causing autovacuum to get killed and thus never completing, leading to
catastrophic bloat.

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

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

Предыдущее
От: Scott Marlowe
Дата:
Сообщение: Re: Finetuning Autovacuum
Следующее
От: "Benjamin Krajmalnik"
Дата:
Сообщение: Re: Finetuning Autovacuum