Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1T6HHy-0001eQ-IZ for pgsql-admin@postgresql.org; Tue, 28 Aug 2012 08:36:46 +0000 Received: from plane.gmane.org ([80.91.229.3]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1T6HHw-0004pD-Bs for pgsql-admin@postgresql.org; Tue, 28 Aug 2012 08:36:45 +0000 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1T6HHt-000804-1K for pgsql-admin@postgresql.org; Tue, 28 Aug 2012 10:36:41 +0200 Received: from 89.190.196.121 ([89.190.196.121]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 28 Aug 2012 10:36:41 +0200 Received: from postgres by 89.190.196.121 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 28 Aug 2012 10:36:41 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-admin@postgresql.org From: Kouber Saparev Subject: Re: Does pg_reset_stats() influence autovacuum? Date: Tue, 28 Aug 2012 11:36:21 +0300 Lines: 21 Message-ID: References: <5035E2FC.2050805@saparev.com> <20120824024748.GA5965@momjian.us> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 89.190.196.121 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120714 Thunderbird/14.0 In-Reply-To: <20120824024748.GA5965@momjian.us> X-Pg-Spam-Score: -0.9 (/) X-Archive-Number: 201208/115 X-Sequence-Number: 39936 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