Can't drop table

Поиск
Список
Период
Сортировка
Искать

Can't drop table

От:
Hima Surapaneni <hbsur1@student.monash.edu>
Дата:
Hi,

I have created a table called experimenters with the following query:

CREATE TABLE experimenters (     experimenter_id  INTEGER CONSTRAINT firstkey PRIMARY KEY,     first_name       CHAR(20),     last_name        CHAR(25),     address          CHAR(30),     phone_num        CHAR(15)
);

The query was successful. But when I try to drop or alter the table, it just hangs without echoing any error message. I have to cancel the query to get out.

I ran the following query to drop the table

DROP TABLE experimenters;

It also hangs when I try to alter the table.

Just don't understand the problem here.

Any help will be highly appreciated.

Thanks in advance

Hima

Re: Can't drop table

От:
Richard Broersma Jr <rabroersma@yahoo.com>
Дата:
> I have created a table called experimenters with the following query:
> CREATE TABLE experimenters (
>       experimenter_id  INTEGER CONSTRAINT firstkey PRIMARY KEY,
>       first_name       CHAR(20),
>       last_name        CHAR(25),
>       address          CHAR(30),
>       phone_num        CHAR(15)
> );
> The query was successful. But when I try to drop or alter the table, it just hangs without
> echoing any error message. I have to cancel the query to get out.
> I ran the following query to drop the table
> DROP TABLE experimenters;
> It also hangs when I try to alter the table.
> Just don't understand the problem here.
> Any help will be highly appreciated.

You might want to post this on the PG_General Mailing list of you do not get many responses.

Regards,

Richard Broersma Jr.

Re: Can't drop table

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Hima Surapaneni  writes:
> The query was successful. But when I try to drop or alter the table, it just hangs without echoing any error message. I have to cancel the query to get out.

Sounds like there's some open transaction with a lock on the table.
The pg_locks view might help you figure out which one.
		regards, tom lane

FAQ