X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 52056DB21F for ; Fri, 28 Oct 2005 12:14:26 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 91216-07 for ; Fri, 28 Oct 2005 15:14:25 +0000 (GMT) Received: from mail.ecircle.de (mail.ecircle.de [195.140.186.200]) by svr1.postgresql.org (Postfix) with ESMTP id EA68DDB20D for ; Fri, 28 Oct 2005 12:14:24 -0300 (ADT) Received: from [192.168.1.110] (unknown [192.168.1.110]) by mail.ecircle.de (READY) with ESMTP id 1235D9541A3 for ; Fri, 28 Oct 2005 17:14:22 +0200 (CEST) Subject: How long it takes to vacuum a big table From: Csaba Nagy To: postgres performance list Content-Type: text/plain Message-Id: <1130512461.25950.20.camel@coppola.muc.ecircle.de> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Fri, 28 Oct 2005 17:14:21 +0200 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.014 required=5 tests=[AWL=0.014] X-Spam-Score: 0.014 X-Spam-Level: X-Archive-Number: 200510/440 X-Sequence-Number: 15208 Hi all, I wonder what is the main driving factor for vacuum's duration: the size of the table, or the number of dead tuples it has to clean ? We have a few big tables which are also heavily updated, and I couldn't figure out a way to properly vacuum them. Vacuuming any of those took very long amounts of time (I started one this morning and after ~5h30min it's still running - and it's not even the biggest or most updated table), which I can't really afford because it prevents other vacuum processes on smaller tables to do their job due to the transaction open for the long-running vacuum. BTW, is it in any way feasible to implement to make one vacuum not blocking other vacuums from cleaning dead tuples after the first one started ? I know it's the transaction not the vacuum which blocks, but then wouldn't be a way to run vacuum somehow in "out of transaction context" mode ? Another issue: vacuum is not responding to cancel requests, at least not in a reasonable amount of time... Thanks in advance, Csaba.