pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: adurugkar@xento.com
To: pgsql-bugs@postgresql.org
Subject: BUG #11321: describe command is getting locked due to ALTER statement running on public table
Date: Mon, 01 Sep 2014 11:55:37 +0000
Message-ID: <20140901115537.2921.56171@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

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



view thread (2+ messages)  latest in thread

Message-ID: <20140901115537.2921.56171@wrigleys.postgresql.org>
Permalink:  ../20140901115537.2921.56171@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/20140901115537.2921.56171@wrigleys.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: adurugkar@xento.com
  Subject: Re: BUG #11321: describe command is getting locked due to ALTER statement running on public table
  In-Reply-To: <20140901115537.2921.56171@wrigleys.postgresql.org>
  References: <20140901115537.2921.56171@wrigleys.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox