Re: how to adjust auto increment id offset?

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема Re: how to adjust auto increment id offset?
Дата
Msg-id CAOR=d=3UDWr=nn0F5ABJC74NUd8Bj7wJdJcAXf_VOMszXg6txg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: how to adjust auto increment id offset?  (Yan Chunlu <springrider@gmail.com>)
Список pgsql-general
On Tue, Nov 15, 2011 at 9:03 PM, Yan Chunlu <springrider@gmail.com> wrote:
> thanks a lot for the tip!
> sorry for used the wrong word, it is just multi-master but not sharding,  I
> would like to setup two master server across two datacenter.  one's id
> increased by 1, and the other by 2.
> so I could have a queue sync the record in the background by myself.  kind
> of a dumb way but it seems they only choice for me,  the delay within
> several minutes is acceptable.

you might want to look at either using a larger skip, like 10 or 20,
so you can add more servers at a later date if you need to.  The other
way is to start each sequence at some huge offset like 2Billion and be
sure to use a bigint not a regular int.

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

Предыдущее
От: Yan Chunlu
Дата:
Сообщение: Re: how to adjust auto increment id offset?
Следующее
От: Gavin Flower
Дата:
Сообщение: Re: partitioning a dataset + employing hysteresis condition