Re: Postgresql replication

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: Postgresql replication
Дата
Msg-id 877jeaetnt.fsf@stark.xeocode.com
обсуждение исходный текст
Ответ на Re: Postgresql replication  (William Yu <wyu@talisys.com>)
Список pgsql-general
William Yu <wyu@talisys.com> writes:

> Allocation of unique IDs that don't collide across servers is a must. For 1
> project, instead of using numeric IDs, we using CHAR and pre-append a unique
> server code so record #1 on server A is A0000000001 versus ?x0000000001 on other
> servers. For the other project, we were too far along in development to change
> all our numerics into chars so we wrote custom sequence logic to divide our
> 10billion ID space into 1-Xbillion for server 1, X-Ybillion for server 2, etc.

I would have thought setting the sequences to "INCREMENT BY 100" would let you
handle this simply by setting the sequences on each server to start at a
different value modulo 100.

I wonder if it might be handy to be able to set default sequence parameters on
a per-database level so that you could set this up and then just do a normal
pg_restore of the same schema and get proper non-conflicting sequences on each
server.

I suppose it's the least of your problems though.


--
greg

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

Предыдущее
От: Aly Dharshi
Дата:
Сообщение: Re: Postgresql replication
Следующее
От: Bill Moseley
Дата:
Сообщение: Help with a subselect inside a view