Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 687C3633E43 for ; Thu, 20 May 2010 14:20:16 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 45526-05 for ; Thu, 20 May 2010 17:20:09 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from spinlock.commandprompt.com (host-215.commandprompt.net [207.173.203.215]) by mail.postgresql.org (Postfix) with ESMTP id 8984F633A11 for ; Thu, 20 May 2010 14:20:09 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by spinlock.commandprompt.com (Postfix) with ESMTP id 8E671348034; Thu, 20 May 2010 10:20:08 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at commandprompt.com Received: from spinlock.commandprompt.com ([127.0.0.1]) by localhost (spinlock.commandprompt.com.commandprompt.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Q4VTGpsHu3Ga; Thu, 20 May 2010 10:20:06 -0700 (PDT) Received: from perhan.alvh.no-ip.org (190-95-28-214.bk17-dsl.surnet.cl [190.95.28.214]) by spinlock.commandprompt.com (Postfix) with ESMTPSA id 2B3BB348002; Thu, 20 May 2010 10:20:06 -0700 (PDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 49B4A6E8FE; Thu, 20 May 2010 13:20:04 -0400 (CLT) Content-Type: text/plain; charset=UTF-8 Cc: Ian Lea , =?utf-8?q?Devrim_G=C3=9CND=C3=9CZ?= , pgsql-admin Subject: Re: Clarification Needed: When does autovacuum daemon run? From: Alvaro Herrera To: Narasimha Murthy-VRFX87 In-reply-to: <58FEF525AF1E664D9503ACDEAC926BBC03BE7D8D@ZMY16EXM66.ds.mot.com> References: <58FEF525AF1E664D9503ACDEAC926BBC03BE7D8D@ZMY16EXM66.ds.mot.com> Date: Thu, 20 May 2010 13:20:04 -0400 Message-Id: <1274375829-sup-7935@alvh.no-ip.org> User-Agent: Sup/0.11 Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.8 tagged_above=-10 required=5 tests=BAYES_50=0.8 X-Spam-Level: X-Archive-Number: 201005/192 X-Sequence-Number: 34665 Excerpts from Narasimha Murthy-VRFX87's message of jue may 20 02:47:21 -0400 2010: > Hi Alvaro Herrera, > > Since, my original plan was to run the auto-vacuum daily EXACTLY at 5 am, I wanted to know which seconds of a minute. My query in other word was, if I set autovacuum_naptime to 1 hr, which minute of an hour the auto-vacuum runs (oth min, 15th min or something else). Yeah, you have no way to be know. I guess you could turn autovacuum off in postgresql.conf all day, and exactly at 5am you have a cron job that edits postgresql.conf and reloads Postgres. This would start up autovacuum, which would then continue with the regular schedule. This is hardly ideal; there were plans to improve on this by having an autovacuum schedule, but I think the demand for this feature has decreased considerable, so I haven't given it any minute's thought. > From the clarification given by the you and other community members, I now understood that autovacuum is designed to run frequently in the background, not designed to run once a day at a specific time. Due to this design intent, autovacuum_naptime is set to 1 min by default and autovacuum runs lazy/plain/standard vacuum commands (so that Vacuum can run concurrently with other normal DB operations). Correct. --