Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 9FBED63343A for ; Wed, 4 Nov 2009 17:30:43 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 42962-09 for ; Wed, 4 Nov 2009 21:30:28 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from gw.wicourts.gov (gwmta.wicourts.gov [165.219.244.99]) by mail.postgresql.org (Postfix) with ESMTP id D046763381D for ; Wed, 4 Nov 2009 17:30:32 -0400 (AST) Received: from Courts-MTA by gw.wicourts.gov with Novell_GroupWise; Wed, 04 Nov 2009 15:30:30 -0600 Message-Id: <4AF19E11020000250002C2B0@gw.wicourts.gov> X-Mailer: Novell GroupWise Internet Agent 8.0.0 Date: Wed, 04 Nov 2009 15:30:25 -0600 From: "Kevin Grittner" To: "Dave Crooke" , Subject: Re: vacuum'ing toast crumbs, detecting dangling transactions References: In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.59 tagged_above=-10 required=5 tests=AWL=0.009, BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 200911/51 X-Sequence-Number: 36219 Dave Crooke wrote: > I'm not defending the decision to store blobs in a database (it was > taken a while ago, before the need for frequent updates of the XML) > and it isn't something that can be readily changed at short notice, > so please no advice about "don't do that" :-) I wouldn't sweat 50kB chunks of XML. We store 10MB PDF files. :-) > is showing 40-50% dead tuples. However, if I disconnect the app, all > the dead tuples clean up and moved to the "free space" category. As you suspected, that sounds like lingering database transactions. Try looking at the pg_stat_activity table for transactions "IDLE in transaction". If you're having trouble pinning down the cause, look the pg_locks view to see what tables they've been in. -Kevin