Re: Help! "alter table add column" hangs

From: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
To: kynn(at)panix(dot)com
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Help! "alter table add column" hangs
Date: 2004-03-01 00:43:05
Message-ID: 20040229163538.T53974@megazone.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice


On Sun, 29 Feb 2004 kynn(at)panix(dot)com wrote:

> Sorry, I had meant to write:
>
> The command
>
> ALTER TABLE some_table ADD COLUMN some_column CHAR(6) UNIQUE;
> ^^^^^^^^^^
> hangs indefinitely (hours!), even though the table is relatively small
> (about 2500 records).
>
> What gives?

This likely means that some other transaction has a lock on some_table.
What does
select * from pg_locks where relation=(select oid from pg_class
where relname='some_table')
show?

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message kynn 2004-03-01 03:49:34 Re: Help! "alter table add column" hangs
Previous Message Cath Lawrence 2004-02-29 23:36:19 Huge query help