Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XOTjU-0004TQ-Nd for pgsql-bugs@arkaria.postgresql.org; Mon, 01 Sep 2014 15:41:28 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XOTjT-0003NL-AC for pgsql-bugs@arkaria.postgresql.org; Mon, 01 Sep 2014 15:41:27 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XOQDT-0007mA-PZ for pgsql-bugs@postgresql.org; Mon, 01 Sep 2014 11:56:11 +0000 Received: from wrigleys.postgresql.org ([204.145.124.246]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XOQDL-00027v-TM for pgsql-bugs@postgresql.org; Mon, 01 Sep 2014 11:56:10 +0000 MIME-Version: 1.0 Subject: BUG #11321: describe command is getting locked due to ALTER statement running on public table To: pgsql-bugs@postgresql.org From: adurugkar@xento.com Date: Mon, 01 Sep 2014 11:55:37 +0000 Message-ID: <20140901115537.2921.56171@wrigleys.postgresql.org> X-Pg-Spam-Score: -1.1 (-) Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit 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 The following bug has been logged on the website: Bug reference: 11321 Logged by: Ashutosh Durugkar Email address: adurugkar@xento.com PostgreSQL version: 9.3.5 Operating system: Ubuntu 12.04 Description: Hello Experts, I found this bug in postgresql-9.3.5 version- describe command is getting locked due to ALTER statement running on real table. How to reproduce- Session 1- create table test (t int, name varchar(10)); alter table test add constraint uk_id UNIQUE (t); BEGIN; alter table test DROP constraint uk_id ; Session 2- BEGIN; \d test --This command goes into waiting state. postgres=# select query from pg_stat_activity where waiting='t'; query -------------------------------------------------------------------------------------------------------------------------------------- SELECT c2.relname, i.indisprimary, i.indisunique, i.indisclustered, i.indisvalid, pg_catalog.pg_get_indexdef(i.indexrelid, 0, true),+ pg_catalog.pg_get_constraintdef(con.oid, true), contype, condeferrable, condeferred, c2.reltablespace + FROM pg_catalog.pg_class c, pg_catalog.pg_class c2, pg_catalog.pg_index i + LEFT JOIN pg_catalog.pg_constraint con ON (conrelid = i.indrelid AND conindid = i.indexrelid AND contype IN ('p','u','x')) + WHERE c.oid = '2309188489' AND c.oid = i.indrelid AND i.indexrelid = c2.oid + ORDER BY i.indisprimary DESC, i.indisunique DESC, c2.relname; It was working fine on 9.3.4 version. Thanks for looking. -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs