Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id EC8859FB715 for ; Thu, 22 Feb 2007 16:30:03 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-new, port 10024) with ESMTP id 35566-03 for ; Thu, 22 Feb 2007 16:29:53 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from cassarossa.samfundet.no (cassarossa.samfundet.no [129.241.93.19]) by postgresql.org (Postfix) with ESMTP id 28FCD9FBAB3 for ; Thu, 22 Feb 2007 16:29:55 -0400 (AST) Received: from trofast.sesse.net ([129.241.93.32]) by cassarossa.samfundet.no with esmtp (Exim 4.50) id 1HKKZd-0001Lr-SW for pgsql-performance@postgresql.org; Thu, 22 Feb 2007 21:29:54 +0100 Received: from sesse by trofast.sesse.net with local (Exim 3.36 #1 (Debian)) id 1HKKZ6-0000IE-00 for ; Thu, 22 Feb 2007 21:29:21 +0100 Date: Thu, 22 Feb 2007 21:29:20 +0100 From: "Steinar H. Gunderson" To: pgsql-performance@postgresql.org Subject: Re: Vacuum full very slow due to nonremovable dead rows...What makes the dead rows non-removable? Message-ID: <20070222202920.GA1102@uio.no> Mail-Followup-To: pgsql-performance@postgresql.org References: <8A72E69E1F79004B82F76F228B3F2923067B62B7@corp-mail01.ncircle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <8A72E69E1F79004B82F76F228B3F2923067B62B7@corp-mail01.ncircle.com> X-Operating-System: Linux 2.6.19 on a x86_64 X-Message-Flag: Outlook? --> http://www.mozilla.org/products/thunderbird/ User-Agent: Mutt/1.5.13 (2006-08-11) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200702/234 X-Sequence-Number: 23288 On Thu, Feb 22, 2007 at 12:19:50PM -0800, Barbara Cosentino wrote: > I have a table that gets many rows inserted, updated and then deleted, > consistently throughout the day. At any point in time this table should > have no more than 50 actual rows and many times a direct select against > this table produces no rows. This table also has a VACUUM FULL ANALYZE > performed against it about very 30 minutes. You should not usually need VACUUM FULL; doing so all the time will probably _decrease_ your performance. > I noticed the vacuum was taking a considerable amount of time for a table > with a small number of actual rows. The output of the first vacuum full > analyze verbose I performed showed that this table had 3,699,704 dead row > versions that could not be removed. This number of dead rows that could > not be released increased with each vacuum full that was performed. The > output of the last vacuum full is shown below. Do you have any long-running transactions going? Those are likely to make rows nonremovable. Look for idle workers in a transaction. /* Steinar */ -- Homepage: http://www.sesse.net/