Re: Database in use?

From: Carol Walter <walterc(at)indiana(dot)edu>
To:
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Database in use?
Date: 2009-03-02 20:50:11
Message-ID: 91CFD986-3CF6-4419-9908-2FEF9C469441@indiana.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Well, most recently I had created a new database using UTF8 encoding
and I had restored data to it, that had been in a database using
SQL_ASCII. I wanted to rename the original database. When I tried to
rename it, I got the message that I couldn't do it because the
database was in use. This particular database is in a 8.2.4 release.
I'm moving to 8.3.n but I'm not there yet.

Carol

On Mar 2, 2009, at 3:32 PM, Tom Lane wrote:

> Carol Walter <walterc(at)indiana(dot)edu> writes:
>> Periodically, my databases will give me a message that says that
>> someone is using the database when it appears that no one is. What
>> causes this? What can I do about it?
>
> What's the context exactly?
>
> In some cases you can get this type of message because of the fact
> that
> it takes finite time for an existing backend to exit. For instance in
>
> psql -c "some command" somedb
> dropdb somedb
>
> there's a nonzero probability that the backend launched for the psql
> session will still exist when the dropdb runs. Recent PG versions
> have
> a hack in DROP DATABASE to wait a little bit to see if conflicting
> backends will exit; but maybe you're running a version that hasn't got
> that patch, or maybe you're doing something else.
>
> regards, tom lane
>
> --
> Sent via pgsql-admin mailing list (pgsql-admin(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-admin

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2009-03-02 21:23:33 Re: Database in use?
Previous Message Julio Leyva 2009-03-02 20:49:49 Re: Database in use?