Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 07448650EC8 for ; Mon, 30 Jun 2008 12:39: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 98018-02-4 for ; Mon, 30 Jun 2008 12:39:15 -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 99B0A650EBA for ; Mon, 30 Jun 2008 12:34:47 -0300 (ADT) Received: by hyperion.scode.org (Postfix, from userid 1001) id E76A623C453; Mon, 30 Jun 2008 17:34:35 +0200 (CEST) Date: Mon, 30 Jun 2008 17:34:35 +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: <20080630153435.GA15756@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="jI8keyz6grp/JLjh" 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/239 X-Sequence-Number: 30589 --jI8keyz6grp/JLjh Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello, > No. VACUUM takes an exclusive lock at the end of the operation to > truncate empty pages. (If it cannot get the lock then it'll just skip > this step.) In 8.2.4 there was a bug that caused it to sleep > according to vacuum_delay during the scan to identify possibly empty > pages. This was fixed in 8.2.5: [snip revision log] Thank you very much! This does indeed seem to be the likely culprit. Will try to either upgrade, or if not possible in time for the next occurance, confirm that this is what is happening based on pg_locks. Thanks again for the very informative response. --=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 --jI8keyz6grp/JLjh Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAkho/QsACgkQDNor2+l1i30zgwCfbeO7GZFl6c1r7NN5CfYbqfwS G1YAn1pvVs+C5oOPvwvEazRB7P9i7N1D =Gl49 -----END PGP SIGNATURE----- --jI8keyz6grp/JLjh--