X-Original-To: pgsql-hackers-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 4BB6F9FB2A6 for ; Fri, 15 Sep 2006 06:41:32 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 44907-04 for ; Fri, 15 Sep 2006 06:41:23 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from svana.org (svana.org [125.62.87.134]) by postgresql.org (Postfix) with ESMTP id 28C119FB1BA for ; Fri, 15 Sep 2006 06:41:23 -0300 (ADT) Received: from kleptog by svana.org with local (Exim 4.50) id 1GOABr-0002am-H4; Fri, 15 Sep 2006 19:40:55 +1000 Date: Fri, 15 Sep 2006 11:40:55 +0200 From: Martijn van Oosterhout To: Tom Lane Cc: Jeff Davis , andy , Alvaro Herrera , pgsql-hackers@postgreSQL.org Subject: Re: [ADMIN] Vacuum error on database postgres Message-ID: <20060915094055.GD1608@svana.org> Reply-To: Martijn van Oosterhout References: <44F82150.5000809@pnlassociates.com> <4001.1157121669@sss.pgh.pa.us> <27602.1158238299@sss.pgh.pa.us> <45095CDD.8090704@squeakycode.net> <29469.1158247230@sss.pgh.pa.us> <1158271045.29889.143.camel@dogma.v10.wvs> <16508.1158272742@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="6WlEvdN9Dv0WHSBl" Content-Disposition: inline In-Reply-To: <16508.1158272742@sss.pgh.pa.us> X-PGP-Key-ID: Length=1024; ID=0x0DC67BE6 X-PGP-Key-Fingerprint: 295F A899 A81A 156D B522 48A7 6394 F08A 0DC6 7BE6 X-PGP-Key-URL: User-Agent: Mutt/1.5.9i X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: kleptog@svana.org X-SA-Exim-Scanned: No (on svana.org); SAEximRunCond expanded to false X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.084 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200609/1222 X-Sequence-Number: 90751 --6WlEvdN9Dv0WHSBl Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Sep 14, 2006 at 06:25:42PM -0400, Tom Lane wrote: > Jeff Davis writes: > > How would creating a new lock type avoid deadlocks when an ANALYZE is > > accumulating the locks in random order? >=20 > In itself it wouldn't. Josh Drake sketched the idea in more detail > later: if there is a lock type used *only* for ANALYZE, then you can do > ConditionalLockAcquire on it, and if you fail, skip the table on the > assumption that someone else is already doing what you came to do. Wouldn't it be useful for ANALYZE to do a conditional lock anyway and skip if it can't acquire. Especially for the analyse-from-autovacuum case, perhaps an ANALYSE NOLOCK or whatever. For stuff run from autovacuum, would it be reasonable for the automatically run version to just abort if it sees someone doing the same thing? Have a nice day, --=20 Martijn van Oosterhout http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to l= itigate. --6WlEvdN9Dv0WHSBl Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFFCnUnIB7bNG8LQkwRArHqAKCEhkynFfkP6a3EQTRqKSckplXUgQCeMEBP J2tEb/iyernQLkLRKmCuzY0= =yTuZ -----END PGP SIGNATURE----- --6WlEvdN9Dv0WHSBl--