Обсуждение: Dropping a DB while it is in use?

Поиск
Список
Период
Сортировка

Dropping a DB while it is in use?

От
"Chad N. Tindel"
Дата:
Is there a way to kill all the connections to a DB so that it can safely
be dropped?  Given that connections to a DB can come from any number of clients,
the only way I've found to do this is to shutdown postgres, which is clearly
an unacceptable solution because it stops access to the other 50 or so databases
that are being used on the system.

Thanks,

Chad

Re: Dropping a DB while it is in use?

От
Gaetano Mendola
Дата:
Chad N. Tindel wrote:

> Is there a way to kill all the connections to a DB so that it can safely
> be dropped?  Given that connections to a DB can come from any number of clients,
> the only way I've found to do this is to shutdown postgres, which is clearly
> an unacceptable solution because it stops access to the other 50 or so databases
> that are being used on the system.

You can do a  kill -INT  to backend that are managing the connection.


Regards
Gaeatano Mendola