Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 1F1F7650CF5 for ; Mon, 30 Jun 2008 12:43:25 -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 02525-01 for ; Mon, 30 Jun 2008 12:43:21 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from hyperion.scode.org (hyperion.scode.org [85.17.42.115]) by postgresql.org (Postfix) with ESMTP id 611AB650EC4 for ; Mon, 30 Jun 2008 12:43:21 -0300 (ADT) Received: by hyperion.scode.org (Postfix, from userid 1001) id F40CC23C48A; Mon, 30 Jun 2008 17:43:18 +0200 (CEST) Date: Mon, 30 Jun 2008 17:43:18 +0200 From: Peter Schuller To: Alvaro Herrera Cc: pgsql-performance@postgresql.org Subject: Re: VACUUM ANALYZE blocking both reads and writes to a table Message-ID: <20080630154318.GB15756@hyperion.scode.org> References: <20080630145903.GA15197@hyperion.scode.org> <20080630152515.GF10311@alvh.no-ip.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ZoaI/ZTpAVc4A5k6" Content-Disposition: inline In-Reply-To: <20080630152515.GF10311@alvh.no-ip.org> User-Agent: Mutt/1.5.18 (2008-05-17) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200806/240 X-Sequence-Number: 30590 --ZoaI/ZTpAVc4A5k6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Actually, while on the topic: > date: 2007-09-10 13:58:50 -0400; author: alvherre; state: Exp; lin= es: +6 -2; > Remove the vacuum_delay_point call in count_nondeletable_pages, becau= se we hold > an exclusive lock on the table at this point, which we want to releas= e as soon > as possible. This is called in the phase of lazy vacuum where we tru= ncate 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? 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? (I realize various exclusive locks are taken for short periods of time even for things that are officially declared non-blocking; the question is whether this falls into this category.) --=20 / Peter Schuller PGP userID: 0xE9758B7D or 'Peter Schuller ' Key retrieval: Send an E-Mail to getpgpkey@scode.org E-Mail: peter.schuller@infidyne.com Web: http://www.scode.org --ZoaI/ZTpAVc4A5k6 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAkho/xQACgkQDNor2+l1i32D/gCeLbh7tnWdch/ScxIOIcEreulG T4sAoJgFti+zggEqnUHz79t/sK6ma8n6 =hpoH -----END PGP SIGNATURE----- --ZoaI/ZTpAVc4A5k6--