From: | adurugkar(at)xento(dot)com |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | BUG #11321: describe command is getting locked due to ALTER statement running on public table |
Date: | 2014-09-01 11:55:37 |
Message-ID: | 20140901115537.2921.56171@wrigleys.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
The following bug has been logged on the website:
Bug reference: 11321
Logged by: Ashutosh Durugkar
Email address: adurugkar(at)xento(dot)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.
From | Date | Subject | |
---|---|---|---|
Next Message | thomas | 2014-09-01 15:41:49 | BUG #11325: Documentation Bug / RFE |
Previous Message | Wöhling | 2014-09-01 09:38:29 | Re: BUG #11304: UNION query with NULL values fails |