Re: Way to shutdown/freeze/stop an individual database without taking postmaster down?

Поиск
Список
Период
Сортировка
От Chris Browne
Тема Re: Way to shutdown/freeze/stop an individual database without taking postmaster down?
Дата
Msg-id 60k5j5xtus.fsf@dba2.int.libertyrms.com
обсуждение исходный текст
Ответ на Way to shutdown/freeze/stop an individual database without taking postmaster down?  ("W S" <ws3reg@gmail.com>)
Список pgsql-general
ws3reg@gmail.com ("W S") writes:
> I was asked this question, and I wasn't sure if it is possible:
>
>
> do you know of a way to stop just one database (not delete/drop) on
> our PostgreSQL 8.1 server?
>
>
> And, while I know how to shut down postmaster, and/or put in rules to
> pg_hba.conf to limit access to a certain database, is there any way to
> freeze or stop just one database and not others?  I'm attempting to
> RTFM it, but so far I've had no luck.

You could put in rules to pg_hba.conf to shut users out of a
particular database, and then run "pg_ctl reload" to signal the
postmaster to start applying the new rules.

That will prevent any new connections from coming into the database in
question.

But does not get rid of existing connections.  You could kill the
backends associated with the existing connections...  You can query
pg_catalog.pg_stat_activity to find the relevant list.
--
let name="cbbrowne" and tld="linuxdatabases.info" in String.concat "@" [name;tld];;
http://cbbrowne.com/info/advocacy.html
Whatever is  contradictory or paradoxical is called  the  back of God.
His face, where all exists in perfect harmony, cannot be seen by man.

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

Предыдущее
От: "Scott Marlowe"
Дата:
Сообщение: Re: Can´t connect but listen address and pg_hba configured correctly
Следующее
От: Chris Browne
Дата:
Сообщение: Re: pgcrypto and dblink