pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Does pg_reset_stats() influence autovacuum?
3+ messages / 2 participants
[nested] [flat]

* Does pg_reset_stats() influence autovacuum?
@ 2012-08-23 07:59 Kouber Saparev <postgres@saparev.com>
  2012-08-24 02:47 ` Re: Does pg_reset_stats() influence autovacuum? Bruce Momjian <bruce@momjian.us>
  0 siblings, 1 reply; 3+ messages in thread

From: Kouber Saparev @ 2012-08-23 07:59 UTC (permalink / raw)
  To: pgsql-admin

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




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Does pg_reset_stats() influence autovacuum?
  2012-08-23 07:59 Does pg_reset_stats() influence autovacuum? Kouber Saparev <postgres@saparev.com>
@ 2012-08-24 02:47 ` Bruce Momjian <bruce@momjian.us>
  2012-08-28 08:36   ` Re: Does pg_reset_stats() influence autovacuum? Kouber Saparev <postgres@saparev.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Bruce Momjian @ 2012-08-24 02:47 UTC (permalink / raw)
  To: Kouber Saparev <postgres@saparev.com>; +Cc: pgsql-admin

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  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

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




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Does pg_reset_stats() influence autovacuum?
  2012-08-23 07:59 Does pg_reset_stats() influence autovacuum? Kouber Saparev <postgres@saparev.com>
  2012-08-24 02:47 ` Re: Does pg_reset_stats() influence autovacuum? Bruce Momjian <bruce@momjian.us>
@ 2012-08-28 08:36   ` Kouber Saparev <postgres@saparev.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Kouber Saparev @ 2012-08-28 08:36 UTC (permalink / raw)
  To: pgsql-admin

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





^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2012-08-28 08:36 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2012-08-23 07:59 Does pg_reset_stats() influence autovacuum? Kouber Saparev <postgres@saparev.com>
2012-08-24 02:47 ` Bruce Momjian <bruce@momjian.us>
2012-08-28 08:36   ` Kouber Saparev <postgres@saparev.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox