From: | Daniel McCue <dmccue128(at)gmail(dot)com> |
---|---|
To: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
Cc: | pgsql-bugs(at)lists(dot)postgresql(dot)org |
Subject: | Re: table called 'configuration' cannot be dropped |
Date: | 2019-03-08 16:38:20 |
Message-ID: | CAEnhctUSzXoSV0vqyer9Y6ikStZPJ-BVDw-91gELBqRk6ewbMw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Thank you Pavel! This is very helpful. You are correct that it was a lock
problem.
I appreciate the help. My problem is resolved now.
Cheers,
Dan
On Fri, Mar 8, 2019 at 10:55 AM Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
wrote:
>
>
> pá 8. 3. 2019 v 16:51 odesílatel Daniel McCue <dmccue128(at)gmail(dot)com>
> napsal:
>
>> I am running Postgresql version 9.5.14 on Ubuntu linux 16.04.
>> My schema defines a table called configuration.
>> From psql:
>> # \d configuration
>> Table "public.configuration"
>> Column | Type | Modifiers
>> ----------------+------------------------+-----------
>> parametername | character varying(64) | not null
>> parametervalue | character varying(256) |
>> Indexes:
>> "configuration_pkey" PRIMARY KEY, btree (parametername)
>>
>> PROBLEM:
>> When in psql, I type:
>> # DROP TABLE configuration;
>>
>> psql just hangs. No further output from psql.
>> If I hit CTRL-C, it responds as expected with:
>>
>> ^CCancel request sent
>> ERROR: canceling statement due to user request
>>
>> But why is psql stuck on the DROP statement?
>> Is configuration a reserved word or pre-defined table?
>> Do I need to rename the table?
>>
>
>
> postgres=# create table public.configuration(xx int);
> CREATE TABLE
>
> postgres=# drop table public.configuration ;
> DROP TABLE
>
> you can see, the name is not reserved. Probably some queries in some long
> transactions holds a locks on this table.
>
> you should to check locks
>
>
> https://stackoverflow.com/questions/26489244/how-to-detect-query-which-holds-the-lock-in-postgres
>
> Pavel
>
>
>
>> Thanks,
>> Dan McCue
>>
>>
From | Date | Subject | |
---|---|---|---|
Next Message | PG Bug reporting form | 2019-03-08 17:38:33 | BUG #15678: The postgresql.conf string does not define server behavior (default_transaction_isolation) |
Previous Message | Pavel Stehule | 2019-03-08 15:55:02 | Re: table called 'configuration' cannot be dropped |