The command

ALTER 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

Search Discussions

  • Kynn at Feb 29, 2004 at 10: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
  • Stephan Szabo at Mar 1, 2004 at 12:43 am

    On Sun, 29 Feb 2004 kynn@panix.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?
  • Kynn at Mar 1, 2004 at 3:49 am
    X-Original-To: kynn@panix.com
    Date: Sun, 29 Feb 2004 16:43:05 -0800 (PST)
    From: Stephan Szabo <sszabo@megazone.bigpanda.com>
    Cc: pgsql-novice@postgresql.org

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

    That's what it was. Thanks!!!

    kj

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppgsql-novice @
categoriespostgresql
postedFeb 29, '04 at 10:06p
activeMar 1, '04 at 3:49a
posts4
users2
websitepostgresql.org
irc#postgresql

2 users in discussion

Kynn: 3 posts Stephan Szabo: 1 post

People

Translate

site design / logo © 2022 Grokbase