Does pg_reset_stats() influence autovacuum?

Поиск
Список
Период
Сортировка
Искать

Does pg_reset_stats() influence autovacuum?

От:
Kouber Saparev <postgres@saparev.com>
Дата:
Hello,

Does resetting of stats through pg_reset_stats() influence the way
autovacuum determines whether autovacuum_vacuum_scale_factor and
autovacuum_analyze_scale_factor settings are reached?

In other words, are the n_live_tup and n_dead_tup values kept somewhere
internally, apart pg_stat_all_tables?

--
Kouber Saparev

Re: Does pg_reset_stats() influence autovacuum?

От:
Bruce Momjian <bruce@momjian.us>
Дата:
On Thu, Aug 23, 2012 at 10:59:56AM +0300, Kouber Saparev wrote:
> Hello,
> 
> Does resetting of stats through pg_reset_stats() influence the way
> autovacuum determines whether autovacuum_vacuum_scale_factor and
> autovacuum_analyze_scale_factor settings are reached?
> 
> In other words, are the n_live_tup and n_dead_tup values kept somewhere
> internally, apart pg_stat_all_tables?

No.  pg_reset_stats() will affect autovacuum, usually in a bad way.

-- 
  Bruce Momjian          http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +

Re: Does pg_reset_stats() influence autovacuum?

От:
Kouber Saparev <postgres@saparev.com>
Дата:
On 08/24/2012 05:47 AM, Bruce Momjian wrote:
> On Thu, Aug 23, 2012 at 10:59:56AM +0300, Kouber Saparev wrote:
>> Hello,
>>
>> Does resetting of stats through pg_reset_stats() influence the way
>> autovacuum determines whether autovacuum_vacuum_scale_factor and
>> autovacuum_analyze_scale_factor settings are reached?
>>
>> In other words, are the n_live_tup and n_dead_tup values kept somewhere
>> internally, apart pg_stat_all_tables?
> 
> No.  pg_reset_stats() will affect autovacuum, usually in a bad way.
> 

So, I guess the only safe moment to reset stats is right after manual
vacuum analyze.

Thanks.

--
Kouber Saparev
FAQ