Re: [HACKERS] proposal: DROP DATABASE variant that kills active sessions

2015-10-16 Thread Robert Haas
On Fri, Oct 16, 2015 at 6:22 AM, Pavel Stehule wrote: > in GoodData we have this feature implemented - little bit different named - > DROP DATABASE FORCE > > It is useful in complex environment with mix of pooled and not pooled > connections - and in our environment -

Re: [HACKERS] proposal: DROP DATABASE variant that kills active sessions

2015-10-16 Thread Fabrízio de Royes Mello
On Fri, Oct 16, 2015 at 4:12 PM, Robert Haas wrote: > > On Fri, Oct 16, 2015 at 6:22 AM, Pavel Stehule wrote: > > in GoodData we have this feature implemented - little bit different named - > > DROP DATABASE FORCE > > > > It is useful in complex

Re: [HACKERS] proposal: DROP DATABASE variant that kills active sessions

2015-10-16 Thread Andres Freund
On 2015-10-16 16:32:25 -0300, Fabrízio de Royes Mello wrote: > On Fri, Oct 16, 2015 at 4:12 PM, Robert Haas wrote: > > I think this would be a useful feature. What would one do about > > prepared transactions? > > > > Isn't "rollback all prepared" before an option? Not

Re: [HACKERS] proposal: DROP DATABASE variant that kills active sessions

2015-10-16 Thread Pavel Stehule
2015-10-16 21:12 GMT+02:00 Robert Haas : > On Fri, Oct 16, 2015 at 6:22 AM, Pavel Stehule > wrote: > > in GoodData we have this feature implemented - little bit different > named - > > DROP DATABASE FORCE > > > > It is useful in complex environment

[HACKERS] proposal: DROP DATABASE variant that kills active sessions

2015-10-16 Thread Filip Rembiałkowski
DROP DATABASE mydb CONCURRENTLY; That would perform forced shutdown 1) reject any new backends to mydb 2) terminate old backends 3) drop db 40 upvotes here http://dba.stackexchange.com/a/11895/3710 inspired me to propose this improvement. If you think it's a good idea please include it as a

Re: [HACKERS] proposal: DROP DATABASE variant that kills active sessions

2015-10-16 Thread Pavel Stehule
Hi 2015-10-16 12:13 GMT+02:00 Filip Rembiałkowski < filip.rembialkow...@gmail.com>: > DROP DATABASE mydb CONCURRENTLY; > > That would perform forced shutdown > > 1) reject any new backends to mydb > 2) terminate old backends > 3) drop db > > 40 upvotes here