dbTalk Databases Forums  

drop database not working

comp.databases.postgresql comp.databases.postgresql


Discuss drop database not working in the comp.databases.postgresql forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Sylar surfer
 
Posts: n/a

Default drop database not working - 06-18-2008 , 10:10 AM






Tomcat 5.5, Java 1.5, Postgres 8.2.
I use jndi to access resources. When I try to delete a database, listed
in the context.xml, I get the message: ERROR: database is being
accessed by other user.
It seems that pooling service has not released the resource. I waited
some time just to let dbcp release abandoned connections, I wrote a
function etc. but nothing seems to work. Of course nobody is connected
to the database.
Is it a Postgres problem or a tomcat dbcp pooling problem? Can you help
me?



Reply With Quote
  #2  
Old   
Laurenz Albe
 
Posts: n/a

Default Re: drop database not working - 06-18-2008 , 10:42 AM






Sylar surfer <sylar.surfer (AT) email (DOT) it> wrote:
Quote:
Tomcat 5.5, Java 1.5, Postgres 8.2.
I use jndi to access resources. When I try to delete a database, listed
in the context.xml, I get the message: ERROR: database is being
accessed by other user.
It seems that pooling service has not released the resource. I waited
some time just to let dbcp release abandoned connections, I wrote a
function etc. but nothing seems to work. Of course nobody is connected
to the database.
Are you sure? What is the result of the following query:

SELECT datname, procpid, usename, backend_start FROM pg_stat_activity;

Which database do you want to drop?

Yours,
Laurenz Albe


Reply With Quote
  #3  
Old   
Laurenz Albe
 
Posts: n/a

Default Re: drop database not working - 06-18-2008 , 10:42 AM



Sylar surfer <sylar.surfer (AT) email (DOT) it> wrote:
Quote:
Tomcat 5.5, Java 1.5, Postgres 8.2.
I use jndi to access resources. When I try to delete a database, listed
in the context.xml, I get the message: ERROR: database is being
accessed by other user.
It seems that pooling service has not released the resource. I waited
some time just to let dbcp release abandoned connections, I wrote a
function etc. but nothing seems to work. Of course nobody is connected
to the database.
Are you sure? What is the result of the following query:

SELECT datname, procpid, usename, backend_start FROM pg_stat_activity;

Which database do you want to drop?

Yours,
Laurenz Albe


Reply With Quote
  #4  
Old   
Laurenz Albe
 
Posts: n/a

Default Re: drop database not working - 06-18-2008 , 10:42 AM



Sylar surfer <sylar.surfer (AT) email (DOT) it> wrote:
Quote:
Tomcat 5.5, Java 1.5, Postgres 8.2.
I use jndi to access resources. When I try to delete a database, listed
in the context.xml, I get the message: ERROR: database is being
accessed by other user.
It seems that pooling service has not released the resource. I waited
some time just to let dbcp release abandoned connections, I wrote a
function etc. but nothing seems to work. Of course nobody is connected
to the database.
Are you sure? What is the result of the following query:

SELECT datname, procpid, usename, backend_start FROM pg_stat_activity;

Which database do you want to drop?

Yours,
Laurenz Albe


Reply With Quote
  #5  
Old   
Laurenz Albe
 
Posts: n/a

Default Re: drop database not working - 06-18-2008 , 10:42 AM



Sylar surfer <sylar.surfer (AT) email (DOT) it> wrote:
Quote:
Tomcat 5.5, Java 1.5, Postgres 8.2.
I use jndi to access resources. When I try to delete a database, listed
in the context.xml, I get the message: ERROR: database is being
accessed by other user.
It seems that pooling service has not released the resource. I waited
some time just to let dbcp release abandoned connections, I wrote a
function etc. but nothing seems to work. Of course nobody is connected
to the database.
Are you sure? What is the result of the following query:

SELECT datname, procpid, usename, backend_start FROM pg_stat_activity;

Which database do you want to drop?

Yours,
Laurenz Albe


Reply With Quote
  #6  
Old   
Laurenz Albe
 
Posts: n/a

Default Re: drop database not working - 06-18-2008 , 10:42 AM



Sylar surfer <sylar.surfer (AT) email (DOT) it> wrote:
Quote:
Tomcat 5.5, Java 1.5, Postgres 8.2.
I use jndi to access resources. When I try to delete a database, listed
in the context.xml, I get the message: ERROR: database is being
accessed by other user.
It seems that pooling service has not released the resource. I waited
some time just to let dbcp release abandoned connections, I wrote a
function etc. but nothing seems to work. Of course nobody is connected
to the database.
Are you sure? What is the result of the following query:

SELECT datname, procpid, usename, backend_start FROM pg_stat_activity;

Which database do you want to drop?

Yours,
Laurenz Albe


Reply With Quote
  #7  
Old   
Laurenz Albe
 
Posts: n/a

Default Re: drop database not working - 06-18-2008 , 10:42 AM



Sylar surfer <sylar.surfer (AT) email (DOT) it> wrote:
Quote:
Tomcat 5.5, Java 1.5, Postgres 8.2.
I use jndi to access resources. When I try to delete a database, listed
in the context.xml, I get the message: ERROR: database is being
accessed by other user.
It seems that pooling service has not released the resource. I waited
some time just to let dbcp release abandoned connections, I wrote a
function etc. but nothing seems to work. Of course nobody is connected
to the database.
Are you sure? What is the result of the following query:

SELECT datname, procpid, usename, backend_start FROM pg_stat_activity;

Which database do you want to drop?

Yours,
Laurenz Albe


Reply With Quote
  #8  
Old   
Laurenz Albe
 
Posts: n/a

Default Re: drop database not working - 06-18-2008 , 10:42 AM



Sylar surfer <sylar.surfer (AT) email (DOT) it> wrote:
Quote:
Tomcat 5.5, Java 1.5, Postgres 8.2.
I use jndi to access resources. When I try to delete a database, listed
in the context.xml, I get the message: ERROR: database is being
accessed by other user.
It seems that pooling service has not released the resource. I waited
some time just to let dbcp release abandoned connections, I wrote a
function etc. but nothing seems to work. Of course nobody is connected
to the database.
Are you sure? What is the result of the following query:

SELECT datname, procpid, usename, backend_start FROM pg_stat_activity;

Which database do you want to drop?

Yours,
Laurenz Albe


Reply With Quote
  #9  
Old   
Laurenz Albe
 
Posts: n/a

Default Re: drop database not working - 06-18-2008 , 10:42 AM



Sylar surfer <sylar.surfer (AT) email (DOT) it> wrote:
Quote:
Tomcat 5.5, Java 1.5, Postgres 8.2.
I use jndi to access resources. When I try to delete a database, listed
in the context.xml, I get the message: ERROR: database is being
accessed by other user.
It seems that pooling service has not released the resource. I waited
some time just to let dbcp release abandoned connections, I wrote a
function etc. but nothing seems to work. Of course nobody is connected
to the database.
Are you sure? What is the result of the following query:

SELECT datname, procpid, usename, backend_start FROM pg_stat_activity;

Which database do you want to drop?

Yours,
Laurenz Albe


Reply With Quote
  #10  
Old   
Sylar Surfer
 
Posts: n/a

Default Re: drop database not working - 06-18-2008 , 11:30 AM



Sembra che Laurenz Albe abbia detto :
Quote:
SELECT datname, procpid, usename, backend_start FROM pg_stat_activity;
"postgres";3196;"postgres"
"common";624;"postgres"
"common";3284;"postgres"

Quote:
Which database do you want to drop?

There is a db named "common" which stores general informations, for
example the JNDI naming of the other databases, and other db's named
"courseN" where N=1,2,3,...
I create "course2", using my template, then I want to drop it. I
connect to "common" and I create a statement "DROP DATABASE course2".
Executing the statement fires the error. Even if I don't open the db
"course2" it seems to be locked by the Java application (or Tomcat).
Executing the drop command from PGAdmin or command line (dropdb) gives
the same error.




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.