[pgpool-general: 3868] Re: cannot drop database

Janusz Borkowski janusz.borkowski at infobright.com
Thu Jul 9 18:01:57 JST 2015


Indeed, I restarted cluster and DROP works fine now. The problem occurred initially after some time the cluster was executing a complicated workload. If I am able to reproduce this consistently I will follow...

Thanks!!

On 09.07.2015 01:42, Tatsuo Ishii wrote:
> Did not reproduce here.
>
> t-ishii at localhost: createdb -p 11000 test2
> t-ishii at localhost: psql -p 11000 test2
> Pager usage is off.
> psql (9.4.4)
> Type "help" for help.
>
> test2=# drop database if exists test2;
> ERROR:  cannot drop the currently open database
> test2=# \c postgres
> You are now connected to database "postgres" as user "t-ishii".
> postgres=# drop database if exists test2;
> DROP DATABASE
>
> When drop database is requested from client, pgpool-II tries to
> disconnect all sessions by sending a signal and sleep 5 seconds before
> actually dropping the database. Maybe your machine is slow or running
> some other heavy jobs?
>
> Best regards,
> --
> Tatsuo Ishii
> SRA OSS, Inc. Japan
> English: http://www.sraoss.co.jp/index_en.php
> Japanese:http://www.sraoss.co.jp
>
>> Hi!
>>
>> I have a *single* psql client - no other sessions:
>>
>> de2505=#
>>
>> I try to drop database de2505:
>>
>> de2505=# \c postgres
>> You are now connected to database "postgres" as user "postgres".
>> postgres=# drop database if exists de2505;
>> ERROR:  database "de2505" is being accessed by other users
>> DETAIL:  There is 1 other session using the database.
>>
>> again:
>>
>> postgres=# \c de2505;
>> You are now connected to database "de2505" as user "postgres".
>> de2505=# \c postgres
>> You are now connected to database "postgres" as user "postgres".
>> postgres=# drop database if exists de2505;
>> ERROR:  database "de2505" is being accessed by other users
>> DETAIL:  There are 2 other sessions using the database.
>>
>> again:
>>
>> de2505=# \c postgres
>> You are now connected to database "postgres" as user "postgres".
>> postgres=# drop database if exists de2505;
>> ERROR:  database "de2505" is being accessed by other users
>> DETAIL:  There are 3 other sessions using the database.
>>
>> one more time:
>>
>> postgres=# \c de2505;
>> You are now connected to database "de2505" as user "postgres".
>> de2505=# \c postgres
>> You are now connected to database "postgres" as user "postgres".
>> postgres=# drop database if exists de2505;
>> ERROR:  database "de2505" is being accessed by other users
>> DETAIL:  There are 4 other sessions using the database.
>>
>> For me it looks that pgpool keeps connections to the database, which prevents DROP DATABASE from succeeding. The number of connections increases with each \c from the same client.
>>
>> How to ensure DROP DATABASE  succeeds ?
>>
>> Thanks!
>> JanuszB
>> _______________________________________________
>> pgpool-general mailing list
>> pgpool-general at pgpool.net
>> http://www.pgpool.net/mailman/listinfo/pgpool-general



More information about the pgpool-general mailing list