X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 506979DC993 for ; Tue, 17 Jan 2006 15:32:58 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 42969-06 for ; Tue, 17 Jan 2006 15:32:58 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id BA0FC9DC9A4 for ; Tue, 17 Jan 2006 15:32:55 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id k0HJWqnb020593; Tue, 17 Jan 2006 14:32:52 -0500 (EST) To: Chris Browne cc: pgsql-performance@postgresql.org Subject: Re: Autovacuum / full vacuum In-reply-to: <604q42elzl.fsf@dba2.int.libertyrms.com> References: <20060117145649.GE21092@phlogiston.dyndns.org> <608xteerfh.fsf@dba2.int.libertyrms.com> <20060117173046.GA4296@surnet.cl> <604q42elzl.fsf@dba2.int.libertyrms.com> Comments: In-reply-to Chris Browne message dated "Tue, 17 Jan 2006 13:40:46 -0500" Date: Tue, 17 Jan 2006 14:32:52 -0500 Message-ID: <20592.1137526372@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.09 required=5 tests=[AWL=0.090] X-Spam-Score: 0.09 X-Spam-Level: X-Archive-Number: 200601/255 X-Sequence-Number: 16733 Chris Browne writes: > alvherre@alvh.no-ip.org (Alvaro Herrera) writes: >> Even a database-wide vacuum does not take locks on more than one table. >> The table locks are acquired and released one by one, as the operation >> proceeds. > Has that changed recently? I have always seen "vacuumdb" or SQL > "VACUUM" (without table specifications) running as one long > transaction which doesn't release the locks that it is granted until > the end of the transaction. You sure? It's not supposed to, and watching a database-wide vacuum with "select * from pg_locks" doesn't look to me like it ever has locks on more than one table (plus the table's indexes and toast table). regards, tom lane