Re: proposal: DROP DATABASE variant that kills active sessions

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: proposal: DROP DATABASE variant that kills active sessions
Дата
Msg-id CAFj8pRBE3iwaO5W5oxXTUvrdsVSKrapSusJg6vi=Ah6E8YmZbA@mail.gmail.com
обсуждение исходный текст
Ответ на proposal: DROP DATABASE variant that kills active sessions  (Filip Rembiałkowski <filip.rembialkowski@gmail.com>)
Ответы Re: proposal: DROP DATABASE variant that kills active sessions  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Hi

2015-10-16 12:13 GMT+02:00 Filip Rembiałkowski <filip.rembialkowski@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 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 low-priority TODO item.

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 - about 2K databases per server with lot of dropped / created databases per server / per day.

I can publish this patch, if there will be any interest.

last note: little bit related topic - we have some patches for CREATE DATABASE - longer waiting for locking template1 - although there are some opened issues - like any CREATE DATABASE requires checkpoint, and it is slower in our environment.

Regards

Pavel


 

thanks


--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Filip Rembiałkowski
Дата:
Сообщение: proposal: DROP DATABASE variant that kills active sessions
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: Parallel Seq Scan