Re: 9.1.2: Preventing connections / syncing a database

Поиск
Список
Период
Сортировка
От Rob Sargentg
Тема Re: 9.1.2: Preventing connections / syncing a database
Дата
Msg-id 4F00E56C.3060007@gmail.com
обсуждение исходный текст
Ответ на 9.1.2: Preventing connections / syncing a database  (Jay Levitt <jay.levitt@gmail.com>)
Ответы Re: 9.1.2: Preventing connections / syncing a database  (Jay Levitt <jay.levitt@gmail.com>)
Список pgsql-general
On 01/01/2012 11:51 AM, Jay Levitt wrote:
>
> revoke connect on database rails_dev from public;
> select pg_terminate_backend(procpid) from pg_stat_activity where
> datname='rails_dev';
>
> Still, the app can reconnect. (So can psql.)
>
> So...
>
> 1. How can I prevent (or redirect, or timeout, or anything) new
> connections? I think superuser roles might be exempt from connection
> limits and privileges.  I could repeatedly terminate backends until
> I'm able to rename the database, but... ick.
>
> 2. What's a better way to slave to a master database without being a
> read-only slave?  In other words, we want to use the production
> database as a starting point each morning, but we'll be creating test
> rows and tables that we wouldn't want to propagate to production. Can
> I do this while the database is live through some existing replication
> tool?  The production database is on Ubuntu but the workstations are
> Macs, FWIW.
>
> Jay
More along the lines of what Greg has said.  Not clear to me why an
individual dev box needs to be that current data-wise.  Of course
stopping and starting your app should be easy, especially for the
developers so maybe that's a better place to start.  Then dev can do it
when and how often suits dev best (even cronning shutdown app; reload
db; to happen 3am Sundays)

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

Предыдущее
От: "Greg Sabino Mullane"
Дата:
Сообщение: Re: 9.1.2: Preventing connections / syncing a database
Следующее
От: "Albe Laurenz"
Дата:
Сообщение: Re: Large Objects and and Vacuum