Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id F05559FA1DA for ; Wed, 18 Oct 2006 13:56:15 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 23227-08 for ; Wed, 18 Oct 2006 16:56:09 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id D3B7F9FA18A for ; Wed, 18 Oct 2006 13:56:08 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id k9IGu7Wc027873; Wed, 18 Oct 2006 12:56:07 -0400 (EDT) To: Atesz cc: pgsql-performance@postgresql.org Subject: Re: ACCESS EXCLUSIVE lock In-reply-to: <4536391E.7040604@ritek.hu> References: <4536391E.7040604@ritek.hu> Comments: In-reply-to Atesz message dated "Wed, 18 Oct 2006 16:24:30 +0200" Date: Wed, 18 Oct 2006 12:56:07 -0400 Message-ID: <27872.1161190567@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200610/360 X-Sequence-Number: 21489 Atesz writes: > My question: Why need this strict locking? > In my opinion there isn't exclusion between the DROP CONSTRAINT and the > SELECT. This isn't going to be changed, because the likely direction of future development is that the planner will start making use of constraints even for SELECT queries. This means that a DROP CONSTRAINT operation could invalidate the plan of a SELECT query, so the locking will be essential. regards, tom lane