Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id B11816327F0 for ; Wed, 4 Nov 2009 21:27:31 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 43563-09 for ; Thu, 5 Nov 2009 01:27:23 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.171]) by mail.postgresql.org (Postfix) with ESMTP id E3DCA6325BC for ; Wed, 4 Nov 2009 21:27:23 -0400 (AST) Received: from [192.168.1.3] (pool-96-244-14-10.bltmmd.fios.verizon.net [96.244.14.10]) by mrelayeu.kundenserver.de (node=mreu0) with ESMTP (Nemesis) id 0Lsupa-1M84fK377q-012jcR; Thu, 05 Nov 2009 02:27:22 +0100 Message-ID: <4AF229F5.201@2ndquadrant.com> Date: Wed, 04 Nov 2009 20:27:17 -0500 From: Greg Smith User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 To: Dave Crooke CC: pgsql-performance Subject: Re: Followup: vacuum'ing toast References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V01U2FsdGVkX1+9gQvrmGvouE49fxpG58ae0r+vRdKYbjxpKuJ jnTwEUnXIKuZd0Sq8ja7Fjmu0c8vgGyluQwTyOPQ8xPklYbE0Y Ah7MxQswe7DNl5wI6VL/YqmwsvTnsa1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.599 tagged_above=-10 required=5 tests=BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 200911/55 X-Sequence-Number: 36223 Dave Crooke wrote: > Since the Jackrabbit tables are in the same namespace / user / schema > as ours, am I right in thinking that this is effectively blocking the > entire auto-vaccum system from doing anything at all? > Yes, but the problem is actually broader than that: it wouldn't matter if it was a different user or namespace, the impact would still be the same. PostgreSQL gets rid of needing to hold a bunch of table/row locks by using an approach called MVCC: http://www.postgresql.org/docs/8.4/static/mvcc-intro.html The biggest downside of that approach is that if you have an old client lingering around, things that happened in the database after it started can't be cleaned up. That client might still be referring to the old copy of that data, so that anything it looks at will be a consistent snapshot that includes the earlier version of the rows, the database is paranoid about letting VACUUM clean the things you've deleted up. In 8.4 this situation is improved for some common use cases. In the 8.3 you're using, an old transaction will block any VACUUM attempt from moving past that point in time forever. You have to figure out how to get Hibernate to close the transaction it's leaving open for VACUUM to work. -- Greg Smith greg@2ndquadrant.com Baltimore, MD