pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Charles Sprickman <spork@biglist.com>
To: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: autovacuum was not vacuuming
Date: Wed, 27 May 2015 01:02:24 -0400
Message-ID: <1E6196B0-6B63-4BC9-8E14-DF54AC2A1F34@biglist.com> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>

I’m having some trouble figuring out what was going on that led up to this, but after neglecting maintenance for some time, I noticed that even though autovacuum was not disabled, it never seemed to be getting around to vacuuming.

Some basics - PG 9.2, about 150 databases, autovacuum default settings

After an initial read of some vacuuming tips, I came up with the following settings:

autovacuum = on				# Enable autovacuum subprocess?  'on'
log_autovacuum_min_duration = 100	# -1 disables, 0 logs all actions and
autovacuum_max_workers = 8		# max number of autovacuum subprocesses
autovacuum_naptime = 40min		# time between autovacuum runs
autovacuum_vacuum_scale_factor = 0.1	# fraction of table size before vacuum
autovacuum_analyze_scale_factor = 0.1	# fraction of table size before analyze
autovacuum_vacuum_cost_delay = 10ms	# default vacuum cost delay for
					# autovacuum, in milliseconds;
autovacuum_vacuum_cost_limit = 1000	# default vacuum cost limit for
					# autovacuum, -1 means use

My main interest there actually was getting logs, but something obviously kicked in as I started seeing a number of databases/tables getting vacuumed 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 that.

Was the combination of the large(?) number of databases and default settings effectively preventing autovacuum from doing its thing?

Thanks,

Charles

-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



view thread (4+ messages)  latest in thread

Message-ID: <1E6196B0-6B63-4BC9-8E14-DF54AC2A1F34@biglist.com>
Permalink:  ../1E6196B0-6B63-4BC9-8E14-DF54AC2A1F34@biglist.com/
Also on:    postgresql.org/message-id/1E6196B0-6B63-4BC9-8E14-DF54AC2A1F34@biglist.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: spork@biglist.com
  Subject: Re: autovacuum was not vacuuming
  In-Reply-To: <1E6196B0-6B63-4BC9-8E14-DF54AC2A1F34@biglist.com>
  References: <1E6196B0-6B63-4BC9-8E14-DF54AC2A1F34@biglist.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox