Re: Please make it easy to drop a database that is in use
От
Tom Lane
Тема
Re: Please make it easy to drop a database that is in use
Дата
Msg-id
24795.1340287629@sss.pgh.pa.us
Ответ на
Список
Дерево обсуждения
Please make it easy to drop a database that is in use Evan Martin <postgresql@realityexists.net>
Re: Please make it easy to drop a database that is in use Sergey Konoplev <sergey.konoplev@postgresql-consulting.com>
Re: Please make it easy to drop a database that is in use Evan Martin <postgresql@realityexists.net>
Re: Please make it easy to drop a database that is in use Sergey Konoplev <gray.ru@gmail.com>
Re: Please make it easy to drop a database that is in use Evan Martin <postgresql@realityexists.net>
Re: Please make it easy to drop a database that is in use Tom Lane <tgl@sss.pgh.pa.us>
Re: Please make it easy to drop a database that is in use Evan Martin <postgresql@realityexists.net>
Re: Please make it easy to drop a database that is in use Raghavendra <raghavendra.rao@enterprisedb.com>
Re: Please make it easy to drop a database that is in use "Albe Laurenz" <laurenz.albe@wien.gv.at>
Evan Martin writes: > That's a fair point, so perhaps DROP DATABASE should still fail if the > /current/ connection is to that database (preferably with a helpful > error like "you cannot drop the database you are connected to"). It does that. > SELECT pg_terminate_backend(procpid) > FROM pg_stat_activity > WHERE datname = 'dropme'; > ERROR: must be superuser to signal other server processes As far as that goes, there's a pending patch to reduce the privileges required to use pg_terminate_backend. I'm not in favor of having DROP DATABASE do it for you though --- that just seems like a very large-caliber foot gun. regards, tom lane
В списке pgsql-general по дате отправления
От: Albe Laurenz
Дата:
От: Adrian Klaver
Дата: