Re: autovacuum on a -mostly- r/o table

Поиск
Список
Период
Сортировка
От Tobias Brox
Тема Re: autovacuum on a -mostly- r/o table
Дата
Msg-id 20060927165336.GA11191@oppetid.no
обсуждение исходный текст
Ответ на Re: autovacuum on a -mostly- r/o table  (Edoardo Ceccarelli <eddy@axa.it>)
Список pgsql-performance
[Edoardo Ceccarelli - Wed at 06:49:23PM +0200]
> ...another thing is, how could autovacuum check for machine load, this
> is something I cannot imagine right now...

One solution I made for our application, is to check the
pg_stats_activity view.  It requires some config to get the stats
available in that view, though.  When the application is to start a
low-priority transaction, it will first do:

  select count(*) from pg_stat_activity where current_query not like
  '<IDL%' and query_start+?<now();

if the returned value is high, the application will sleep a bit and try
again later.


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

Предыдущее
От: Edoardo Ceccarelli
Дата:
Сообщение: Re: autovacuum on a -mostly- r/o table
Следующее
От: Rod Taylor
Дата:
Сообщение: Re: autovacuum on a -mostly- r/o table