Re: Autovacuum and pg_stat_reset()

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Rafael Martinez <r(dot)m(dot)guerrero(at)usit(dot)uio(dot)no>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Autovacuum and pg_stat_reset()
Date: 2009-07-20 02:57:51
Message-ID: 20090720025751.GJ4938@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Rafael Martinez wrote:

> Does the use of pg_stat_reset() affects the statistics autovacuum uses
> to find out what to do and when this should be done?

Yes. You should do a manual ANALYZE after resetting stats to keep
autovacuum in sync with reality. (In principle ANALYZE is only
concerned with updating the unrelated stats in pg_statistic, but it also
sends dead/live tuple counts to pgstats which autovacuum relies on.)

> Can the use of pg_stat_reset() affect performance in any way?

Hmm, not sure.

--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2009-07-20 03:00:21 Re: timestamp with time zone tutorial
Previous Message Dennis Gearon 2009-07-20 02:43:20 Re: timestamp with time zone tutorial