Re: Database in use?

From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: Carol Walter <walterc(at)indiana(dot)edu>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Database in use?
Date: 2009-03-04 21:53:26
Message-ID: dcc563d10903041353y4e094d8dt29cce4f30c9080f6@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Wed, Mar 4, 2009 at 2:40 PM, Carol Walter <walterc(at)indiana(dot)edu> wrote:
> This has happened or is happening to me again, only this time, it's a
> database that I just created.  I restored another database into a test
> database.  One of the tables is empty.  I want to drop the test database and
> create a new one.  When I try to drop the test database, I get this error -
> template1=# drop database km_tezt;
> ERROR:  database "km_tezt" is being accessed by other users
>
> template1=# select * from pg_prepared_xacts;
>  transaction | gid | prepared | owner | database
> -------------+-----+----------+-------+----------
> (0 rows)

What does "select * from pg_stat_activity say about this db?

> This database is one that I created just a few hours ago just to test some
> things myself.  There can be no one in it except me.  I completely closed

Correct me if I'm wrong, but isn't that enough ((just you) to cause
the drop database to fail?

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Carol Walter 2009-03-04 21:56:01 Re: Database in use?
Previous Message Tom Lane 2009-03-04 21:51:22 Re: Database in use?