Manually clearing "database "foo" is being accessed by other users"

Поиск
Список
Период
Сортировка
От Sysadmin
Тема Manually clearing "database "foo" is being accessed by other users"
Дата
Msg-id 46F2B807.30908@alteeve.com
обсуждение исходный текст
Ответы Re: Manually clearing "database "foo" is being accessed by other users"  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Manually clearing "database "foo" is being accessed by other users"  (Steve Crawford <scrawford@pinpointresearch.com>)
Список pgsql-general
Hi all,

  I'm finding that routinely when I try to reload a database on a server
where I know there are no connections to a given DB I get the error:

$ dropdb foo && createdb foo -O bar && psql foo -f /path/to/db.out
dropdb: database removal failed: ERROR:  database "foo" is being
accessed by other users

  This means I need to restart the postmaster, but the server contains
many DBs, of which some may actually be in use. How can I tell postgres
that the database 'foo' should be marked as not in use / clear or drop
any open connections / etc?

  Thanks all!

Madi

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

Предыдущее
От: Ilan Volow
Дата:
Сообщение: Re: Building Windows fat clients
Следующее
От: "madhtr"
Дата:
Сообщение: Re: How to clear bits?