pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kouber Saparev <postgres@saparev.com>
To: pgsql-admin@postgresql.org
Subject: Re: Does pg_reset_stats() influence autovacuum?
Date: Tue, 28 Aug 2012 11:36:21 +0300
Message-ID: <k1hvu5$c8g$1@ger.gmane.org> (raw)
In-Reply-To: <20120824024748.GA5965@momjian.us>
References: <5035E2FC.2050805@saparev.com>
	<20120824024748.GA5965@momjian.us>

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





view thread (3+ messages)

Message-ID: <k1hvu5$c8g$1@ger.gmane.org>
Permalink:  ../k1hvu5$c8g$1@ger.gmane.org/
Also on:    postgresql.org/message-id/k1hvu5$c8g$1@ger.gmane.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: postgres@saparev.com
  Subject: Re: Does pg_reset_stats() influence autovacuum?
  In-Reply-To: <k1hvu5$c8g$1@ger.gmane.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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