Re: [GENERAL] dropdb: database removal failed: active sessions

2011-08-29 Thread Scott Marlowe
On Mon, Aug 29, 2011 at 2:39 PM, John R Pierce wrote: > any connection to the database, even idle, will prevent a drop database. > > try... > >    select pg_terminate_backend(procpid) from pg_stat_activity where datname > = 'database1'; > > that will snuff those processes.  then you can drop the d

Re: [GENERAL] dropdb: database removal failed: active sessions

2011-08-29 Thread John R Pierce
On 08/29/11 12:22 PM, JD Wong wrote: I cannot dropdb. Postgres throws me: dropdb: database removal failed: ERROR: database "database1" is being accessed by other users DETAIL: There are 1 other session(s) using the database. the "select datname,current_query,query_start from pg_stat_activit

Re: [GENERAL] dropdb: database removal failed: active sessions

2011-08-29 Thread Guillaume Lelarge
On Mon, 2011-08-29 at 15:22 -0400, JD Wong wrote: > Hi, > > I cannot dropdb. Postgres throws me: > dropdb: database removal failed: ERROR: database "database1" is being > accessed by other users > DETAIL: There are 1 other session(s) using the database. > > the "select datname,current_query,qu

[GENERAL] dropdb: database removal failed: active sessions

2011-08-29 Thread JD Wong
Hi, I cannot dropdb. Postgres throws me: dropdb: database removal failed: ERROR: database "database1" is being accessed by other users DETAIL: There are 1 other session(s) using the database. the "select datname,current_query,query_start from pg_stat_activity ;" query gives me: datna