Re: lock a database from new connections, without modifying

Поиск
Список
Период
Сортировка
От Ben K.
Тема Re: lock a database from new connections, without modifying
Дата
Msg-id Pine.GSO.4.64.0605201051060.3823@coe.tamu.edu
обсуждение исходный текст
Ответ на lock a database from new connections, without modifying pg_hba.conf  ("Marc G. Fournier" <scrappy@postgresql.org>)
Список pgsql-admin
> Is that possible?  I've checked the docs for 8.1, and am not finding anything,
> nor anything in contrib ...
> the best I've been able to think of so far is to modify pg_hba.conf to not
> allow new connections for the duration of the operations I need to perform
> (drop and create a database) ...

Just in case ...

update pg_catalog.pg_database set datallowconn = false where datname =
'...';

http://archives.postgresql.org/pgsql-docs/2004-11/msg00015.php
http://www.postgresql.org/docs/8.1/interactive/manage-ag-templatedbs.html


My twopence.

Ben K.
Developer
http://benix.tamu.edu

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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: query optimization - mysql vs postgresql
Следующее
От: "Ben K."
Дата:
Сообщение: Re: find out all users under specific user