Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 4CAD21337B5C for ; Fri, 21 Jan 2011 19:33:45 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 58317-04 for ; Fri, 21 Jan 2011 23:33:38 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.kickstone.com (smtp.kickstone.co.uk [87.194.183.70]) by mail.postgresql.org (Postfix) with ESMTP id E271E1337B4A for ; Fri, 21 Jan 2011 19:33:37 -0400 (AST) Received: from 87-194-183-69.dsl.cnl.uk.net ([87.194.183.69]:2597 helo=MADRAS2) by mail.kickstone.com with esmtpa (Exim 4.71) (envelope-from ) id 1PgQU4-0002S4-Ju; Fri, 21 Jan 2011 23:33:36 +0000 Message-ID: From: "John Lister" To: "Tom Lane" Cc: References: <927BF3A3F54247FF8C63219A00CE98B5@squarepi.com> <1427.1295651046@sss.pgh.pa.us> Subject: Re: Should autovacuum do a database wide vacuum near transaction limit? Date: Fri, 21 Jan 2011 23:33:36 -0000 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5994 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.461 tagged_above=-10 required=5 tests=BAYES_00=-1.9, STOX_REPLY_TYPE=0.439 X-Spam-Level: X-Archive-Number: 201101/143 X-Sequence-Number: 36583 >> Hi, I'm running 8.3.9 on ubuntu with autovacuum enabled and seemingly >> working properly., however I've started getting messages saying that I'm >> near the transaction limit and I need to do a database wide vacuum, which >> I've started. >> From reading the docs, though I thought that autovacuum would do this on >> my behalf, is this true? > > It's supposed to. Did you look around to see if AV was trying to do > anything? It still seems to be running occasionally vacuuming a table, according to pg_stat_all_tables, it ran 1min ago > It's possible you got bit by this recently-fixed bug, which caused any > large-scale autovacuum operation to take unreasonably long to complete: I'll have to pull in the latest versions, which unfortunately means stopping the db, which I was trying to avoid. On another bizarre note, A database wide vacuum has just finished, but I'm still getting the warnings: GMT WARNING: database "backend" must be vacuumed within 10205310 transactions GMT HINT: To avoid a database shutdown, execute a full-database VACUUM in "backend I did vacuum verbose analyze which doesn't seem to have made a difference... doing SELECT datname, age(datfrozenxid) FROM pg_database; reports that backend has a transaction count near 2Billion but also so does template0 am I doing something wrong? Cheers John