Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Z9Vzx-0002PB-TF for pgsql-bugs@arkaria.postgresql.org; Mon, 29 Jun 2015 10:09:10 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1Z9Vzw-0002rg-MF for pgsql-bugs@arkaria.postgresql.org; Mon, 29 Jun 2015 10:09:08 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1Z9Vz6-0002AT-SF for pgsql-bugs@postgresql.org; Mon, 29 Jun 2015 10:08:17 +0000 Received: from smtp.infracaninophile.co.uk ([2001:8b0:151:1:3cd3:cd67:fafa:3d78]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1Z9Vz3-0001lI-BM for pgsql-bugs@postgresql.org; Mon, 29 Jun 2015 10:08:15 +0000 Received: from zero-gravitas.local (no-reverse-dns.metronet-uk.com [85.199.232.226] (may be forged)) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.15.1/8.15.1) with ESMTPSA id t5TA7tiK000451 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO) for ; Mon, 29 Jun 2015 11:08:03 +0100 (BST) (envelope-from m.seaman@infracaninophile.co.uk) Authentication-Results: smtp.infracaninophile.co.uk; dmarc=none header.from=infracaninophile.co.uk DKIM-Filter: OpenDKIM Filter v2.9.2 smtp.infracaninophile.co.uk t5TA7tiK000451 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=infracaninophile.co.uk; s=201001-infracaninophile; t=1435572483; bh=gJJs3xPqvX0LXdfvj5PXdGZ93RgWkiFSC6wFvywQgMY=; h=Date:From:To:Subject:References:In-Reply-To; z=Date:=20Mon,=2029=20Jun=202015=2011:07:55=20+0100|From:=20Matthew =20Seaman=20|To:=20pgsql-bugs@pos tgresql.org|Subject:=20Re:=20[BUGS]=20BUG=20#13472:=20VACUUM=20ANA LYZE=20hangs=20on=20certain=20tables|References:=20<20150626110830 .3881.92624@wrigleys.postgresql.org>=20<20150626135342.GG4797@alap 3.anarazel.de>=20<558D6429.7080400@adestra.com>=20<20150626145811. GI4797@alap3.anarazel.de>=20<558D6DEF.3090208@adestra.com>=20<2015 0626155845.GA30708@awork2.anarazel.de>|In-Reply-To:=20<20150626155 845.GA30708@awork2.anarazel.de>; b=BbJqsJpbcf7P/Xxqe/kk092LPvS+6EdfeA6jMQr1tzWNywpl5UYJDGeo4JTdzFSUj rdORB5WC6ymcClf4LUzpRRRyRuf943GGy1F4eFDXJ2czSoMSxxO2ZtGwflsnpAoYxn 9lQMZBn2pu6AMpFUmXwsTmsaWmQjps/w8o02v6U0= X-Authentication-Warning: lucid-nonsense.infracaninophile.co.uk: Host no-reverse-dns.metronet-uk.com [85.199.232.226] (may be forged) claimed to be zero-gravitas.local Message-ID: <559118FB.1070605@infracaninophile.co.uk> Date: Mon, 29 Jun 2015 11:07:55 +0100 From: Matthew Seaman User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: pgsql-bugs@postgresql.org Subject: Re: BUG #13472: VACUUM ANALYZE hangs on certain tables References: <20150626110830.3881.92624@wrigleys.postgresql.org> <20150626135342.GG4797@alap3.anarazel.de> <558D6429.7080400@adestra.com> <20150626145811.GI4797@alap3.anarazel.de> <558D6DEF.3090208@adestra.com> <20150626155845.GA30708@awork2.anarazel.de> In-Reply-To: <20150626155845.GA30708@awork2.anarazel.de> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="PqdcVfeduXkSTPOV4evtb2d3Ko4HRHplH" X-Virus-Scanned: clamav-milter 0.98.7 at lucid-nonsense.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-1.5 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on lucid-nonsense.infracaninophile.co.uk X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --PqdcVfeduXkSTPOV4evtb2d3Ko4HRHplH Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 2015/06/26 16:58, Andres Freund wrote: > On 2015-06-26 16:21:19 +0100, Matthew Seaman wrote: >> Restarting the DB is going to require all sorts of outage notification= s >> and general palaver, so we'd definitely prefer not to that if we can >> possibly avoid it. >=20 > Is it feasible to lock the table exclusively for a short time? If so yo= u > can just VACUUM FULL them - given the table sizes that should be fairly= > quick. >=20 > (The difference between table level exclusive locks and cleanup locks i= s > that the latter aren't "fair", i.e. a continious stream of pins will > block them, whereas heavyweight locks are queued) We have found the culprit -- a long running query was apparently locking one of the tables, and killing it has allowed the vacuum to complete. We had checked pg_locks but for some reason this query wasn't obvious. Thanks for you help, and I think we can close this one. Cheers Matthew (posting from the account I subscribed to the list with, but I am the same person as matthew.seaman@adestra.com) --PqdcVfeduXkSTPOV4evtb2d3Ko4HRHplH Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQJ8BAEBCgBmBQJVkRkAXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQxOUYxNTRFQ0JGMTEyRTUwNTQ0RTNGMzAw MDUxM0YxMEUwQTlFNEU3AAoJEABRPxDgqeTn3MwQAJ3EcKzGlTw7xvTiqFUkkkAl BViGAW95f0URzu1VFF4ISPxgCh0Cgg3VxiMMTDFXmrj8PMxBU3CDMmELaSvMGRce cF2n5hyvWFdffbgOQJS4EhIt9j0NoUTXzOUXwNNUptyBb08/fLP4Fb/fh3jvuGP2 H8Ruc9kE7axoy6ww0yZBUIR4w7I2JTvGNCH8E1coCvbwQncDFab9xoArOL5n4Lrv Xetvib2t8pfX1ZzENBnJ3BQDyZyQC5b2pjr6jy4ZfMqkhx/ki61MSEiKbbJSo1T/ fGf9XopvWmuijfbXo9MAeFYIPaV9Flcm7/Du/22HXX26KaJz/Fua+MaoHfGK99TC ej86WftdnzKzSKz2vgeg2Wa/YHS1f/Itwz2EdDUTg30x8YiiGXfh4JGJIRGMIagR ZMMdCbxNGCcMqZcMAbzuLvzJuPzkNyFeswqaEh1TNF3nlRNuV9S5z5ssnWvNFo+1 /tL/B/13FGmFGyTv6cAOTnUU79qjb6uDQ2Aj3EQPy7F3RFBzLS19LgOStm9fKt4d u1ZYSqXaw7mIS6/PKNscI9oq4d1+koJM0cGGx7vrIJLzCw02uaG2xxVjOif/TSbB u+Qk8SKe99vbN8RjRpU+EcMudeM3gS7kUyILMS5DJzabWSgltjzW+uuG5osSkXjQ drko8ZfnQKqBApv7zyJO =8u0O -----END PGP SIGNATURE----- --PqdcVfeduXkSTPOV4evtb2d3Ko4HRHplH--