Re: DB alias ?

Поиск
Список
Период
Сортировка
От Steve Crawford
Тема Re: DB alias ?
Дата
Msg-id 5100584F.8040102@pinpointresearch.com
обсуждение исходный текст
Ответ на Re: DB alias ?  (Rob Sargent <robjsargent@gmail.com>)
Ответы Re: DB alias ?  ("Gauthier, Dave" <dave.gauthier@intel.com>)
Список pgsql-general
On 01/23/2013 01:16 PM, Rob Sargent wrote:
> On 01/23/2013 02:10 PM, Gauthier, Dave wrote:
>> Nope.  Think of it this way, a new DB is created on day 1 of every
>> month.  So there's a DB called JAN, another called FEB, etc... .  The
>> DB name used in the connect is picked up from the current date/time.
>> But January is oevr and I don't want to create the FEB DB until Feb
>> 15th.  In the meantime, I want those who try to connect to FEB to
>> connect to JAN (for example).
Perhaps it would be better if you more fully explained the problem you
are trying to solve (i.e. is it updated data but identical schemas, are
you replacing the old or are you keeping the old, etc.). Assuming you
have some flexibility in how you solve your actual issue, there are some
options.

1. Use pgBouncer so that all users connect to the pooler - perhaps using
a standard database like "current" and update the real database to which
that connects when it is ready.

2. Use schemas in a database instead of separate databases and update
the role information to set the search path to point to the appropriate
schema. Perhaps always call the most recent schema "current" then rename
schemas as/when needed.

3. Use a connection service file
http://www.postgresql.org/docs/current/static/libpq-pgservice.html that
is pushed/pulled/shared somehow with updated connection information.

Cheers,
Steve


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

Предыдущее
От: John R Pierce
Дата:
Сообщение: Re: DB alias ?
Следующее
От: "Gauthier, Dave"
Дата:
Сообщение: Re: DB alias ?