Re: Cannot drop database that is in use (NOT)

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Cannot drop database that is in use (NOT)
Дата
Msg-id Pine.LNX.4.30.0107021806110.677-100000@peter.localdomain
обсуждение исходный текст
Ответ на Cannot drop database that is in use (NOT)  (Gary Stainburn <gary.stainburn@ringways.co.uk>)
Список pgsql-admin
Gary Stainburn writes:

> ERROR:  DROP DATABASE: Database "revcom" is being accessed by other users

> I know that there is nobody using the database, so I can only assume it is
> some left-over garbage from my first every php script (as I don't know how to
> close the link openned by pg_pconnect).
>
> How do I close any pending connections and reset the usage count so that I
> can drop the database?

Either follow the advice at
http://www.php.net/manual/en/function.pg-pconnect.php or kill the
PostgreSQL backend process.  (Look with ps ax.  With luck you might
identify the process which is using that database from the command line
that ps shows.)  All in all you will find that persistent connections and
volatile databases don't mix well.

--
Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter


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

Предыдущее
От: Gary Stainburn
Дата:
Сообщение: Cannot drop database that is in use (NOT)
Следующее
От: Jie Liang
Дата:
Сообщение: Re: Cannot drop database that is in use (NOT)