Re: dropdb: database removal failed: active sessions

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема Re: dropdb: database removal failed: active sessions
Дата
Msg-id CAOR=d=23rE6=BNPetxfmWJmLGYAYxXqjUnwbhjJH-Nvp=LbQ5Q@mail.gmail.com
обсуждение исходный текст
Ответ на Re: dropdb: database removal failed: active sessions  (John R Pierce <pierce@hogranch.com>)
Список pgsql-general
On Mon, Aug 29, 2011 at 2:39 PM, John R Pierce <pierce@hogranch.com> wrote:
> any connection to the database, even idle, will prevent a drop database.
>
> try...
>
>    select pg_terminate_backend(procpid) from pg_stat_activity where datname
> = 'database1';
>
> that will snuff those processes.  then you can drop the database, assuming
> the clients don't immediately reconnect.

If you lose your connection at this point you'll know who was
connected to that database as well.

Yes, I have done that before.

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

Предыдущее
От: Lonni J Friedman
Дата:
Сообщение: Re: heavy swapping, not sure why
Следующее
От: Scott Marlowe
Дата:
Сообщение: Re: heavy swapping, not sure why