Re: Problems with autovacuum

Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Problems with autovacuum
Дата
Msg-id 20090608193642.GH5598@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: Problems with autovacuum  (Tom Lane)
Ответы Re: Problems with autovacuum  (Tom Lane)
Список pgsql-performance
Дерево обсуждения
Problems with autovacuum  (Łukasz Jagiełło, )
 Re: Problems with autovacuum  (Scott Marlowe, )
  Re: Problems with autovacuum  (Grzegorz Jaśkiewicz, )
   Re: Problems with autovacuum  (Scott Marlowe, )
   Re: Problems with autovacuum  (Łukasz Jagiełło, )
    Re: Problems with autovacuum  (Tom Lane, )
     Re: Problems with autovacuum  (Łukasz Jagiełło, )
     Re: Problems with autovacuum  (Alvaro Herrera, )
      Re: Problems with autovacuum  (Tom Lane, )
       Re: Problems with autovacuum  (Alvaro Herrera, )
        Re: Problems with autovacuum  (Tom Lane, )
         Re: Problems with autovacuum  (Alvaro Herrera, )
          Re: Problems with autovacuum  (Tom Lane, )
           Re: Problems with autovacuum  (Alvaro Herrera, )
            Re: Problems with autovacuum  (Tom Lane, )
             Re: Problems with autovacuum  (Scott Marlowe, )
             Re: Problems with autovacuum  (Alvaro Herrera, )
              Re: Problems with autovacuum  (Tom Lane, )
               Re: Problems with autovacuum  (Alvaro Herrera, )
                Re: Problems with autovacuum  (Alvaro Herrera, )
                Re: Problems with autovacuum  (Tom Lane, )
       Re: Problems with autovacuum  (Łukasz Jagiełło, )
  Re: Problems with autovacuum  (Łukasz Jagiełło, )
   Re: Problems with autovacuum  (Grzegorz Jaśkiewicz, )
Tom Lane escribió:

> Bingo, that's surely exactly what was happening to the OP.  He had 2000
> databases and naptime at (I assume) the default; so he was rerunning
> rebuild_database_list every 100ms.
>
> So that recovery code path needs some more thought.  Maybe a lower bound
> on how often to do rebuild_database_list?  And/or don't set adl_next_worker
> to less than 100ms in the future to begin with?

I've been giving this some thought and tried several approaches.  In the
end the one that I like the most is raising autovacuum_naptime to a
reasonable value for the exiting number of databases.  The only problem
I have with it is that it's trivial to change it in the autovacuum
launcher process and have it stick, but there's no way to propagate the
value out to backends or postmaster to that they SHOW the actual value
in use by the launcher.  The best I can do is emit a WARNING with the
new value.

I have experimented with other choices such as not rebuilding the
database list if the time elapsed since last rebuild is not very long,
but there were small problems with that so I'd prefer to avoid it.

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

Вложения

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Problems with autovacuum
Следующее
От: Віталій Тимчишин
Дата:
Сообщение: Re: Pointers needed on optimizing slow SQL statements