Re: Drop database / database in use question

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

"Dan Armbrust" <daniel(dot)armbrust(dot)list(at)gmail(dot)com> writes:
> On windows, if I attempt to drop a database when I am purposefully
> holding a connection open to the DB, it fails immediately - ~ 100 ms.

> On linux, if I do the same thing, the drop database command takes
> upwards of 4 seconds before it gives up, and says it can't drop the
> DB.

> Is this expected?

I think you are comparing different PG versions. Recent releases will
delay a bit to see if the competing connection disappears.

> Is there some way I can control how long it will
> block the drop command, waiting for the DB to not be in use?

No.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Greg Smith 2008-10-17 18:15:51 Re: Annoying Reply-To
Previous Message Tom Lane 2008-10-17 17:59:13 Re: deferred triggers?