Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id DE7A01337B6E for ; Fri, 25 Mar 2011 13:10:40 -0300 (ADT) 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 02877-08 for ; Fri, 25 Mar 2011 16:10:23 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 015DE1337BCF for ; Fri, 25 Mar 2011 13:10:22 -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 p2PGALnb013557; Fri, 25 Mar 2011 12:10:21 -0400 (EDT) To: Christopher Browne cc: Maxim Boguk , pgsql-bugs@postgresql.org Subject: Re: BUG #5946: Long exclusive lock taken by vacuum (not full) In-reply-to: References: <201103250856.p2P8ufGc004544@wwwmaster.postgresql.org> <4345.1301066239@sss.pgh.pa.us> Comments: In-reply-to Christopher Browne message dated "Fri, 25 Mar 2011 11:58:46 -0400" Date: Fri, 25 Mar 2011 12:10:21 -0400 Message-ID: <13556.1301069421@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201103/334 X-Sequence-Number: 29844 Christopher Browne writes: > On Fri, Mar 25, 2011 at 11:17 AM, Tom Lane wrote: >> Use autovacuum --- if there's something that wants to access the table, >> autovac will get kicked off the lock.  (Of course, the table may never >> get truncated then, but maybe you don't care.) > I could see this turning out somewhat unhappily... > If there's almost always something that wants to access the table, > which would be hardly surprising, in view that the table is being > updated with sufficient regularity that it's got 10GB+ of dead space > at the end, then you're eventually going to *HAVE* to vacuum it. > Transaction rollover, and what not. It is already vacuumed. The only remaining step is to release free space back to the OS; and if he's got a lot of churn in the table, it's not entirely clear that that's a productive activity anyway. regards, tom lane