Re: No aswer WAS: Droping a database even if someone is

From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: Csaba Nagy <nagy(at)ecircle-ag(dot)com>
Cc: Eric Audet <eaudet(at)scc(dot)ca>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: No aswer WAS: Droping a database even if someone is
Date: 2003-03-14 16:41:29
Message-ID: 20030314164129.GC2567@dcc.uchile.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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)

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2003-03-14 16:49:37 Re: Online docs down again
Previous Message Steve Crawford 2003-03-14 16:39:16 Re: now() AT TIME ZONE interval '-5 hours' returns type interval???