Re: Drop database / database in use question - Mailing list pgsql-general

From Tom Lane
Subject Re: Drop database / database in use question
Date
Msg-id 21217.1224266603@sss.pgh.pa.us
Whole thread Raw
In response to Re: Drop database / database in use question  ("Dan Armbrust" <daniel.armbrust.list@gmail.com>)
List pgsql-general
"Dan Armbrust" <daniel.armbrust.list@gmail.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

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: deferred triggers?
Next
From: Greg Smith
Date:
Subject: Re: Annoying Reply-To