serial + db key, or guid?

Поиск
Список
Период
Сортировка
От Mark Phillips
Тема serial + db key, or guid?
Дата
Msg-id 7D67E902-4581-4380-903E-92ECAA9B3866@mophilly.com
обсуждение исходный текст
Ответы Re: serial + db key, or guid?  (Christophe Pettus <xof@thebuild.com>)
Список pgsql-general
Given four instances of posgres, each with a database, each instance receiving new data, and desiring a data “merge” a
laBDR or similar multiple database solutions, my team has been discussing the pros and cons of generating unique keys
ineach table. 

1. create a unique “database” id for each database, add a column to all tables for this id value and combine that with
aserial id 
2. use guid from pg functions
3. create id ranges for each database, e.g. db1 gets 1 to 1M, db2 gets 1M+1 to 2M, and so on

All get us to the finish line, but each has its drawbacks.

Advice, cautionary tales, suggestions and such will be warmly received.

 - Mark


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

Предыдущее
От: John W Higgins
Дата:
Сообщение: Re: UUID or auto-increment
Следующее
От: Christophe Pettus
Дата:
Сообщение: Re: serial + db key, or guid?