Re: No aswer WAS: Droping a database even if someone is - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: No aswer WAS: Droping a database even if someone is
Date
Msg-id 20030314164129.GC2567@dcc.uchile.cl
Whole thread Raw
In response to Re: No aswer WAS: Droping a database even if someone is  (Csaba Nagy <nagy@ecircle-ag.com>)
List pgsql-general
On Fri, Mar 14, 2003 at 03:46:18PM +0100, Csaba Nagy wrote:
> I can't answer your original question (i.e. if it's possible to drop a
> DB while somebody is connected to it), but I think it's possible to
> forced close down all connections.

You can also probably hack something to close all connections to the
specific DB, using ps(1) and perl or sh scripting.  Then you can drop
the database.  Maybe you should set pg_database.datallowcon to false on
the database you want to drop before starting to close connections, so
it doesn't accept future connections before you can do the DROP
DATABASE.

HTH,

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"A wizard is never late, Frodo Baggins, nor is he early.
He arrives precisely when he means to."  (Gandalf, en LoTR FoTR)

pgsql-general by date:

Previous
From: Steve Crawford
Date:
Subject: Re: now() AT TIME ZONE interval '-5 hours' returns type interval???
Next
From: "Ian Harding"
Date:
Subject: Re: Getting Started in Postgresql