Обсуждение: psql hangs after "drop table ..."

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

psql hangs after "drop table ..."

От
Дата:



I'm trying to drop an empty table (0 records) using:

  testdb=> drop table empty_table;

but psql just hangs indefinitely after I hit return.  No error
messages.  (The table definitely exists; no other table refers to it.)

The only way out is to hit Ctrl-C; when I do this I get the message:

  Cancel request sent
  ERROR:  Query was cancelled.
  testdb=>

What's going on?  What can I do to troubleshoot this problem?

Thanks!

kj

Re: psql hangs after "drop table ..."

От
Tom Lane
Дата:
<kynn@panix.com> writes:
> I'm trying to drop an empty table (0 records) using:
>   testdb=> drop table empty_table;
> but psql just hangs indefinitely after I hit return.

Sounds to me like there's another session that has an open transaction
with a lock on that table.

            regards, tom lane