From: Michael P. <mic...@gm...> - 2014-10-08 13:12:16
|
On Wed, Oct 8, 2014 at 9:36 PM, Gilberto Nunes <gil...@gm...> wrote: > Let say if I have two store and the DB is deploy under postgres-xc. Now > Store A, record a register like 00010, and Store B record a register like > 00010 two. > And both sites write this locally and in a center DB with postgres-xc too, > of course... > How postgres-xc will handle with this? Or I will need create differents ID > for both Store like A00010, for Store A, and B00010, fo Store B. > Note the definition of constraints is strictly related to the distribution of the table they are defined on. For example, in the case of hash tables, primary keys and unique constraints need absolutely to contain the column sharded. For replicated tables, there is no real restriction, at the cost that each write needs to be done with 2PC on all the nodes. Btw, what I meant in this explanation is something that you have perhaps already guessed: constraint definition restriction is here because XC guarantees only constraint checks on the datanodes, and not on coordinators. -- Michael |