Обсуждение: serial columns with replication/cluster

Поиск
Список
Период
Сортировка

serial columns with replication/cluster

От
Sean Hsien
Дата:
Dear all,

At work we're considering using postgres in a cluster. But I am
wondering what implications does multi-master write replication have
on auto-incrementing serial columns?
E.g. Do we need to fiddle with the increment amount depending on the
number of nodes we have?

--
Thanks and regards,
Sean

Re: serial columns with replication/cluster

От
Jorge Godoy
Дата:
Sean,

take a look at UUID type.  It might suit you better than serial.

Changing the increment also works, but puts a lot of restrictions on you (such as planning to prevent collision, having to change the increment on several nodes when adding a new node, etc.).


Regards,
--
Jorge Godoy     <jgodoy@gmail.com>


On Wed, Feb 3, 2010 at 23:21, Sean Hsien <sean.hsien@gmail.com> wrote:
Dear all,

At work we're considering using postgres in a cluster. But I am
wondering what implications does multi-master write replication have
on auto-incrementing serial columns?
E.g. Do we need to fiddle with the increment amount depending on the
number of nodes we have?

--
Thanks and regards,
Sean

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general