Received: from localhost (unknown [200.46.204.183]) by developer.postgresql.org (Postfix) with ESMTP id A8FE72E006E for ; Thu, 1 May 2008 10:59:26 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 22760-01 for ; Thu, 1 May 2008 10:59:08 -0300 (ADT) Received: from mx1.hub.org (mx1.hub.org [200.46.208.106]) by developer.postgresql.org (Postfix) with ESMTP id 6E3A12E0060 for ; Thu, 1 May 2008 10:59:14 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mx1.hub.org (Postfix) with ESMTP id 637E0B0890B for ; Thu, 1 May 2008 10:59:07 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id m41DvSip007699; Thu, 1 May 2008 09:57:28 -0400 (EDT) To: Ian Westmacott cc: Alvaro Herrera , pgsql-admin@postgresql.org Subject: Re: 8.1.8 autovacuum missing databases In-reply-to: <1209646882.16174.15.camel@vega.intellivid.com> References: <1209499373.18622.47.camel@vega.intellivid.com> <20080429203335.GK5652@alvh.no-ip.org> <1209503103.18622.68.camel@vega.intellivid.com> <20080429211244.GM5652@alvh.no-ip.org> <1209560546.5209.12.camel@vega.intellivid.com> <20080430161942.GC21286@alvh.no-ip.org> <19778.1209572869@sss.pgh.pa.us> <1209574908.22509.6.camel@vega.intellivid.com> <20185.1209575233@sss.pgh.pa.us> <1209576488.22509.9.camel@vega.intellivid.com> <22093.1209588237@sss.pgh.pa.us> <1209646882.16174.15.camel@vega.intellivid.com> Comments: In-reply-to Ian Westmacott message dated "Thu, 01 May 2008 09:01:22 -0400" Date: Thu, 01 May 2008 09:57:28 -0400 Message-ID: <7698.1209650248@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200805/6 X-Sequence-Number: 29090 Ian Westmacott writes: > I imagine if a database's last process time is in the future, that would > mess up autovacuum's choice algorithm (at the least). Can I confirm > this is the problem? Is there a way to fix it short of dump/restore? Hmm, that would explain a lot wouldn't it ... except that it looks to me like your databases have old enough datvacuumxid to force vacuuming regardless of last_autovac_time. So I'm not fully convinced. AFAICS there is no convenient way in 8.1 to examine the per-database last_autovac_time entries, which'd be needed to confirm this theory. We should check that just to be sure. Please do the following: 1. Stop the postmaster. 2. Move the file $PGDATA/global/pgstat.stat somewhere else. 3. Restart the postmaster. 4. Send pgstat.stat as a binary attachment to me or Alvaro. This will reset all your statistics counters and also the last_autovac_time settings. If autovac starts to behave more normally then we'll know that was it. > I mentioned earlier that I had two installations like this. The second > one doesn't seem to have any time issues. But in that case the only > database being skipped is postgres. Do I need to worry about that? Is the age() getting unreasonably large for postgres? It might be skipping it because there's been no activity. regards, tom lane