Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id C5E87137D6F5 for ; Mon, 14 May 2012 17:02:52 -0300 (ADT) Received: from mailhub1.ep.renesys.com ([195.160.236.248] helo=mailhub1.renesys.com) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SU1Tn-0006zm-Hd for pgsql-admin@postgresql.org; Mon, 14 May 2012 20:02:52 +0000 Received: from ops05.psm1.renesys.com (ops05.psm1.renesys.com [10.200.1.25]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mailhub1.renesys.com (Postfix) with ESMTP id 79B11671E7 for ; Mon, 14 May 2012 20:02:38 +0000 (UTC) Received: (from rouilj@localhost) by ops05.psm1.renesys.com (8.13.8/8.13.8/Submit) id q4EK2cJY005568 for pgsql-admin@postgresql.org; Mon, 14 May 2012 20:02:38 GMT Date: Mon, 14 May 2012 20:02:38 +0000 From: John Rouillard To: pgsql-admin@postgresql.org Subject: Monitoring for failed autovacuum Message-ID: <20120514200238.GM20157@renesys.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201205/64 X-Sequence-Number: 39553 Hello all: I am running postgres 8.4.7 as supplied by centos 5.8. I get a number of messages like: ERROR: canceling autovacuum task CONTEXT: automatic vacuum of table "template0.pg_catalog.pg_shdepend" for a number of different tables in my databases. We use slony to do replication and that does have a tendency to use some tables very heavily resulting in the autovacuum being cancelled. So I am not concerned about these until we have continually failed a certain number of autovacuums. I have set up monitoring to detect 6 successive failures in a week without any intervening successful vacuums (as reported with log_autovacuum_min_duration = 0). In looking through the logs I was expecting to see many more attempts to vacuum a table when the autovacuum had been cancelled. It looks like it's happening every few days rather than retrying a few times a day. I have one ongoing correlation that reports cancelled autovacuums at: Thu May 10 20:59:08 2012 Sun May 13 08:30:59 2012 I assume my next one will arrive Wednesday the 16th or so. So what I am wondering is why is the autovacuum not being rescheduled more often? I assume the fact that the autovacuum wasn't completed should make it more likely to be scheduled, before things start bloating. If this reschedule period is correct operation, what should I set my thresholds to: 3 cancelled autovacuums/week? 6 cancelled/2 weeks? or something else. Thanks. -- -- rouilj John Rouillard System Administrator Renesys Corporation 603-244-9084 (cell) 603-643-9300 x 111