Re: Add force option to dropdb - Mailing list pgsql-hackers

From salah jubeh
Subject Re: Add force option to dropdb
Date
Msg-id 1389887796.25922.YahooMailNeo@web122202.mail.ne1.yahoo.com
Whole thread Raw
In response to Re: Add force option to dropdb  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: Add force option to dropdb  (Sawada Masahiko <sawada.mshk@gmail.com>)
List pgsql-hackers

>If the user owns objects, that will prevent this from working also.  I
>have the feeling that adding DROP OWNED BY and/or REASSIGNED OWNED BY
>calls to this utility would be a bit excessive, but who knows.

Please find attached the first attempt to drop drop the client connections.
I have added an option -k, --kill instead of force since killing client connection does not guarantee -drop force-. 
Regards


On Tuesday, January 14, 2014 8:06 PM, Alvaro Herrera <alvherre@2ndquadrant.com> wrote:
salah jubeh wrote:

> For the sake of completeness:
> 1. I think also, I need also to temporary disallow conecting to the database, is that right?
> 2. Is there other factors can hinder dropping database?

If the user owns objects, that will prevent this from working also.  I
have the feeling that adding DROP OWNED BY and/or REASSIGNED OWNED BY
calls to this utility would be a bit excessive, but who knows.


> 3. Should I write two patches one for pg_version>=9.2 and one for pg_version<9.2 


No point -- nothing gets applied to branches older than current
development anyway.

--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services



Attachment

pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: Why conf.d should be default, and auto.conf and recovery.conf should be in it
Next
From: Andres Freund
Date:
Subject: Re: WAL Rate Limiting