Re: Autovacuum and pg_stat_reset() - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: Autovacuum and pg_stat_reset()
Date
Msg-id 20090720025751.GJ4938@alvh.no-ip.org
Whole thread Raw
In response to Autovacuum and pg_stat_reset()  (Rafael Martinez <r.m.guerrero@usit.uio.no>)
List 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

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: timestamp with time zone tutorial
Next
From: Alvaro Herrera
Date:
Subject: Re: [PERFORM] Incr/Decr Integer