Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YxfWm-0000wv-8P for pgsql-admin@arkaria.postgresql.org; Wed, 27 May 2015 17:54:04 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YxfWl-0002Yt-4k for pgsql-admin@arkaria.postgresql.org; Wed, 27 May 2015 17:54:03 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YxfWi-0002Yk-Tr for pgsql-admin@postgresql.org; Wed, 27 May 2015 17:54:01 +0000 Received: from biglist.com ([207.99.53.219]) by magus.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1YxfWf-0005En-2M for pgsql-admin@postgresql.org; Wed, 27 May 2015 17:53:59 +0000 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=biglist.com; s=bravo-dkim; t=1432749237; bh=alOv6tCkvCqq9tGXec/L5cZIEfM=; h=Received:Received:Content-Type:Mime-Version:Subject:From: In-Reply-To:Date:Cc:Content-Transfer-Encoding:Message-Id: References:To:X-Mailer; b=Ra4HAky2PdzKTCydcsf2fLu9Tfrjxv9Amb5LqAQrCLH/xHjpi6FSIXcroyDak/QBR zaZ/h0sZzJdEipQ4EtRNLTd1F23g1gNeeB7Z1TGzRBYKDn/MiKRYPd1SBVWYBwqlU8 QJXI3cll87bAK/hnvpNyi+tpM2UwELb3+fY15WNk= Received: (qmail 85007 invoked from network); 27 May 2015 17:53:52 -0000 Received: from foon.sporktines.com (HELO fruitcake.sporklab.com) (spork@96.57.144.66) by biglist.com with ESMTPA; 27 May 2015 17:53:52 -0000 Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: autovacuum was not vacuuming From: Charles Sprickman In-Reply-To: Date: Wed, 27 May 2015 13:53:48 -0400 Cc: pgsql-admin@postgresql.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <1E6196B0-6B63-4BC9-8E14-DF54AC2A1F34@biglist.com> To: Jorge Torralba X-Mailer: Apple Mail (2.1878.6) X-Pg-Spam-Score: -1.6 (-) 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 On May 27, 2015, at 1:37 PM, Jorge Torralba wrot= e: > run this for validation >=20 > select relname, last_autovacuum from pg_stat_user_tables order by last_au= tovacuum; Hi - thanks, I=92d run some similar query before to see what wasn=92t being= vacuumed. While some tables seem to be now, here=92s an example of an active db that= =92s still got some blanks in the last_autovacuum column: relname | last_autovacuum ---------------------+------------------------------- optin | 2014-07-21 06:31:47.66319-04 log | 2014-10-18 04:55:22.227628-04 complaint | 2014-10-18 10:43:18.224247-04 arch_subscriber | 2014-11-19 08:27:32.895688-05 subscriber | 2014-12-05 10:12:48.340305-05 transactions | 2015-02-18 12:47:42.406487-05 list_sub | 2015-05-22 10:12:27.755863-04 post | 2015-05-23 01:46:47.039179-04 post_job | 2015-05-23 21:49:03.25371-04 post_actions | 2015-05-26 10:03:43.259077-04 bounce | 2015-05-26 10:29:34.888937-04 bounce_reason | 2015-05-26 10:29:34.918845-04 list_data | 2015-05-27 09:50:21.202492-04 limit_tracking | 2015-05-27 13:10:51.673256-04 post_stats | 2015-05-27 13:10:52.921319-04 email | sending_rule_fields | sending_rule_files | post_threads | forwards | list | sub_active | subscriber_db_field | slice_fields | sending_rule_esps | client | slices | fields | arch_list_sub | sending_rules | subscriber_db_query | engagement | reject_rule | list_criterion | repltest | post_attachment | filters | messages | post_domain | track_url | subscriber_data | message_attachments | migrations | subscriptions | mailer | subscriber_db_file | track_hit | engagement_rules | (48 rows) Any insights based on that? Thanks, Charles > On Tue, May 26, 2015 at 10:02 PM, Charles Sprickman w= rote: > I=92m having some trouble figuring out what was going on that led up to t= his, but after neglecting maintenance for some time, I noticed that even th= ough autovacuum was not disabled, it never seemed to be getting around to v= acuuming. >=20 > Some basics - PG 9.2, about 150 databases, autovacuum default settings >=20 > After an initial read of some vacuuming tips, I came up with the followin= g settings: >=20 > autovacuum =3D on # Enable autovacuum subprocess?= 'on' > log_autovacuum_min_duration =3D 100 # -1 disables, 0 logs all actio= ns and > autovacuum_max_workers =3D 8 # max number of autovacuum subp= rocesses > autovacuum_naptime =3D 40min # time between autovacuum runs > autovacuum_vacuum_scale_factor =3D 0.1 # fraction of table size before= vacuum > autovacuum_analyze_scale_factor =3D 0.1 # fraction of table size before= analyze > autovacuum_vacuum_cost_delay =3D 10ms # default vacuum cost delay for > # autovacuum, in milliseconds; > autovacuum_vacuum_cost_limit =3D 1000 # default vacuum cost limit for > # autovacuum, -1 means use >=20 > My main interest there actually was getting logs, but something obviously= kicked in as I started seeing a number of databases/tables getting vacuume= d that had not been vacuumed in over a year. Some of these tables have at = least a few thousand insert/delete/updates per day, some much more than tha= t. >=20 > Was the combination of the large(?) number of databases and default setti= ngs effectively preventing autovacuum from doing its thing? >=20 > Thanks, >=20 > Charles >=20 > -- > Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-admin >=20 >=20 >=20 > --=20 > Thanks, >=20 > Jorge Torralba > ---------------------------- >=20 > Note: This communication may contain privileged or other confidential inf= ormation. If you are not the intended recipient, please do not print, copy,= retransmit, disseminate or otherwise use the information. Please indicate = to the sender that you have received this email in error and delete the cop= y you received. Thank You. --=20 Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin