Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 91E831337B8C for ; Tue, 16 Nov 2010 11:27:03 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 43973-03 for ; Tue, 16 Nov 2010 15:26:57 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from spinlock.commandprompt.com (host-215.commandprompt.net [207.173.203.215]) by mail.postgresql.org (Postfix) with ESMTP id 8E3901337B84 for ; Tue, 16 Nov 2010 11:26:55 -0400 (AST) Received: from localhost (localhost [127.0.0.1]) by spinlock.commandprompt.com (Postfix) with ESMTP id 3D025348023; Tue, 16 Nov 2010 07:26:49 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at commandprompt.com Received: from spinlock.commandprompt.com ([127.0.0.1]) by localhost (spinlock.commandprompt.com.commandprompt.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WN3DOqQio-Bc; Tue, 16 Nov 2010 07:26:47 -0800 (PST) Received: from perhan.alvh.no-ip.org (unknown [190.95.28.71]) by spinlock.commandprompt.com (Postfix) with ESMTPSA id A418E348022; Tue, 16 Nov 2010 07:26:46 -0800 (PST) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 0E44A6E621; Tue, 16 Nov 2010 12:26:44 -0300 (CLST) Content-Type: text/plain; charset=UTF-8 Cc: pgsql-performance Subject: Re: autovacuum blocks the operations of other manual vacuum From: Alvaro Herrera To: kuopo In-reply-to: References: Date: Tue, 16 Nov 2010 12:26:44 -0300 Message-Id: <1289921093-sup-1911@alvh.no-ip.org> User-Agent: Sup/git Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201011/264 X-Sequence-Number: 41288 Excerpts from kuopo's message of vie nov 12 05:01:24 -0300 2010: > Hi, > > I have a question about the behavior of autovacuum. When I have a big > table A which is being processed by autovacuum, I also manually use > (full) vacuum to clean another table B. Then I found that I always got > something like “found 0 removable, 14283 nonremovable row”. However, > if I stop the autovacuum functionality and use vacuum on that big > table A manually, I can clean table B (ex. found 22615 removable, 2049 > nonremovable row). > > Is this correct? Why do vacuum and autovacuum have different actions? Vacuum full does not assume that it can clean up tuples while other transactions are running, and that includes the (non full, or "lazy") vacuum that autovacuum is running. Autovacuum only runs lazy vacuum; and that one is aware that other concurrent vacuums can be ignored. Just don't use vacuum full unless strictly necessary. It has other drawbacks. -- Álvaro Herrera The PostgreSQL Company - Command Prompt, Inc. PostgreSQL Replication, Consulting, Custom Development, 24x7 support