Discussion:
Does pg_reset_stats() influence autovacuum?
(too old to reply)
Kouber Saparev
2012-08-23 07:59:56 UTC
Permalink
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
--
Sent via pgsql-admin mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Bruce Momjian
2012-08-24 02:47:48 UTC
Permalink
Post by Kouber Saparev
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 <***@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +
--
Sent via pgsql-admin mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Kouber Saparev
2012-08-28 08:36:21 UTC
Permalink
Post by Bruce Momjian
Post by Kouber Saparev
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
--
Sent via pgsql-admin mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Loading...