Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 750B6650EC1 for ; Mon, 30 Jun 2008 13:23:34 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 24003-06 for ; Mon, 30 Jun 2008 13:23:29 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from lists.commandprompt.com (host-159.commandprompt.net [207.173.203.159]) by postgresql.org (Postfix) with ESMTP id F225F650EA2 for ; Mon, 30 Jun 2008 13:23:15 -0300 (ADT) Received: from perhan.alvh.no-ip.org (200-126-116-204.bk8-dsl.surnet.cl [200.126.116.204]) (authenticated bits=0) by lists.commandprompt.com (8.13.8/8.13.8) with ESMTP id m5UGP9Gw029507 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 30 Jun 2008 09:25:12 -0700 Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 290D447C7C; Mon, 30 Jun 2008 12:23:06 -0400 (CLT) Date: Mon, 30 Jun 2008 12:23:06 -0400 From: Alvaro Herrera To: Peter Schuller Cc: pgsql-performance@postgresql.org Subject: Re: VACUUM ANALYZE blocking both reads and writes to a table Message-ID: <20080630162306.GA18252@alvh.no-ip.org> References: <20080630145903.GA15197@hyperion.scode.org> <20080630152515.GF10311@alvh.no-ip.org> <20080630154318.GB15756@hyperion.scode.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080630154318.GB15756@hyperion.scode.org> User-Agent: Mutt/1.5.18 (2008-05-17) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0 (lists.commandprompt.com [207.173.203.159]); Mon, 30 Jun 2008 09:25:12 -0700 (PDT) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200806/243 X-Sequence-Number: 30593 Peter Schuller wrote: > Actually, while on the topic: > > > date: 2007-09-10 13:58:50 -0400; author: alvherre; state: Exp; lines: +6 -2; > > Remove the vacuum_delay_point call in count_nondeletable_pages, because we hold > > an exclusive lock on the table at this point, which we want to release as soon > > as possible. This is called in the phase of lazy vacuum where we truncate the > > empty pages at the end of the table. > > Even with the fix the lock is held. Is the operation expected to be > "fast" (for some definition of "fast") and in-memory, or is this > something that causes significant disk I/O and/or scales badly with > table size or similar? It is fast. > I.e., is this enough that, even without the .4 bug, one should not > really consider VACUUM ANALYZE non-blocking with respect to other > transactions? You should consider it non-blocking. -- Alvaro Herrera http://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc.