dbTalk Databases Forums  

Help! "alter table add column" hangs

comp.databases.postgresql.novice comp.databases.postgresql.novice


Discuss Help! "alter table add column" hangs in the comp.databases.postgresql.novice forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
kynn@panix.com
 
Posts: n/a

Default Help! "alter table add column" hangs - 02-29-2004 , 04:07 PM










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?

Thanks,

kj

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match


Reply With Quote
  #2  
Old   
Stephan Szabo
 
Posts: n/a

Default Re: Help! "alter table add column" hangs - 02-29-2004 , 06:43 PM







On Sun, 29 Feb 2004 kynn (AT) panix (DOT) com wrote:

Quote:
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?


---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster



Reply With Quote
  #3  
Old   
kynn@panix.com
 
Posts: n/a

Default Re: Help! "alter table add column" hangs - 02-29-2004 , 09:49 PM





X-Original-To: kynn (AT) panix (DOT) com
Date: Sun, 29 Feb 2004 16:43:05 -0800 (PST)
From: Stephan Szabo <sszabo (AT) megazone (DOT) bigpanda.com>
Cc: pgsql-novice (AT) postgresql (DOT) org

This likely means that some other transaction has a lock on some_table.

That's what it was. Thanks!!!

kj


---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.