Re: Drop database / database in use question

From: "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>
To: "Dan Armbrust" <daniel(dot)armbrust(dot)list(at)gmail(dot)com>
Cc: "pgsql general" <pgsql-general(at)postgresql(dot)org>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: Drop database / database in use question
Date: 2008-10-17 14:30:13
Message-ID: dcc563d10810170730t54cbae2ej45b10a21e9e683a2@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Oct 17, 2008 at 8:28 AM, Dan Armbrust
<daniel(dot)armbrust(dot)list(at)gmail(dot)com> wrote:
> But there is no user2. I _know_ I am the only user of this database.
>
> So how can User 1 create a race condition by himself?
>
> Or is this something PostgreSQL is doing internally (like vacuum) ?
>
> Do I really just have to keep trying the DROP command N times in a
> row, until it decides it wants to work? That really doesn't seem
> right.

Could be autovac. Easiest way is to use psql -c to get a list of pids
that are connected and kill the backends (just kill, not kill -9) then
try to drop it again. loop through that every few seconds and it
should work.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2008-10-17 14:32:05 Re: OR or IN ?
Previous Message Scott Marlowe 2008-10-17 14:28:57 Re: Annoying Reply-To