Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Yxfd2-0001Ik-7P for pgsql-admin@arkaria.postgresql.org; Wed, 27 May 2015 18:00:32 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Yxfd1-0004t0-NB for pgsql-admin@arkaria.postgresql.org; Wed, 27 May 2015 18:00:31 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Yxfd0-0004su-PZ for pgsql-admin@postgresql.org; Wed, 27 May 2015 18:00:30 +0000 Received: from smtprelay0019.b.hostedemail.com ([64.98.42.19] helo=smtprelay.b.hostedemail.com) by makus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1Yxfcw-0006L4-RY for pgsql-admin@postgresql.org; Wed, 27 May 2015 18:00:29 +0000 Received: from filter.hostedemail.com (10.5.19.248.rfc1918.com [10.5.19.248]) by smtprelay01.b.hostedemail.com (Postfix) with ESMTP id 1F5572D2A25; Wed, 27 May 2015 18:00:25 +0000 (UTC) X-Session-Marker: 616C76686572726540616C76682E6E6F2D69702E6F7267 X-Spam-Summary: 50, 0, 0, , d41d8cd98f00b204, alvherre@alvh.no-ip.org, :::::, RULES_HIT:41:152:355:379:599:800:960:967:973:988:989:1260:1263:1277:1311:1312:1313:1314:1345:1359:1437:1515:1516:1518:1519:1534:1541:1593:1594:1595:1596:1711:1730:1747:1777:1792:2198:2199:2393:2525:2553:2560:2563:2682:2685:2731:2859:2916:2933:2937:2939:2942:2945:2947:2951:2954:3022:3138:3139:3140:3141:3142:3353:3865:3866:3867:3868:3870:3871:3873:3874:3934:3936:3938:3941:3944:3947:3950:3953:3956:3959:4416:4605:4659:5007:6119:6261:7514:7875:7903:9025:9121:10004:10400:10848:11026:11232:11256:11257:11658:11914:12296:12517:12519:13069:13311:13357:13894:13895:21060:21063:21080, 0, RBL:none, CacheIP:none, Bayesian:0.5, 0.5, 0.5, Netcheck:none, DomainCache:0, MSF:not bulk, SPF:fn, MSBL:0, DNSBL:none, Custom_rules:0:0:0 X-HE-Tag: man19_5adee4993a24c X-Filterd-Recvd-Size: 2434 Received: from alvin.alvh.no-ip.org (unknown [200.85.219.137]) (Authenticated sender: alvherre@alvh.no-ip.org) by omf14.b.hostedemail.com (Postfix) with ESMTPA; Wed, 27 May 2015 18:00:24 +0000 (UTC) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id AC00057B; Wed, 27 May 2015 15:00:06 -0300 (CLT) Date: Wed, 27 May 2015 15:00:06 -0300 From: Alvaro Herrera To: Charles Sprickman Cc: Jorge Torralba , pgsql-admin@postgresql.org Subject: Re: autovacuum was not vacuuming Message-ID: <20150527180006.GD5885@postgresql.org> References: <1E6196B0-6B63-4BC9-8E14-DF54AC2A1F34@biglist.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org Charles Sprickman wrote: > On May 27, 2015, at 1:37 PM, Jorge Torralba wrote: > > > run this for validation > > > > select relname, last_autovacuum from pg_stat_user_tables order by last_autovacuum; > > Hi - thanks, I’d run some similar query before to see what wasn’t being vacuumed. > > While some tables seem to be now, here’s an example of an active db that’s still got some blanks in the last_autovacuum column: Does your system crash frequently? autovacuum would not process files unless they appear to cross the threshold values; and the statistics are reset whenever there's a crash recovery. Perhaps those tables don't have enough recent activity. I see your oldest autovac dates are 2014-07 so perhaps you had crashes sometime before that. How many workers are currently processing tables? (See pg_stat_activity) The more workers there are, the slower they become. Perhaps they are all busy processing large tables and they never finish because of the vacuum_delay. On the other hand, naptime=40min means that from one worker start to the next one there's a 40min wait, which seems a bit too long. Normally the default of 1min is appropriate; why did you change that? -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin