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