Brad Nicholson bnichols at ca.afilias.info
Wed Apr 29 06:56:28 PDT 2009
On Wed, 2009-04-29 at 09:21 -0400, Geoffrey wrote:
> Brad Nicholson wrote:
> > On Tue, 2009-04-28 at 19:27 -0400, Geoffrey wrote:
> >> Quick question.  If I merge set 3 into set 1, I assume the tables in set 
> >> 3 that are merged into set 1 will receive the next table id available in 
> >> set 1?
> > 
> > Table ID will remain unchanged when you merge sets.
> I guess I don't understand this.  If I add it to a new set, then I 
> assume the id will be set to 1 for the first table.
> 
> If I merge it to an existing set where a table id of 1 already exists, 
> then the table id of that table will have to be different.  For example:
> 
> set 1:
> 
> table foo has id 1
> table bar has id 2
> table foobar has id 3
> 
> drop table bar
> create set 2
> add table bar to set 1 (assuming it will get table id 1)

sl_table.tab_id is the primary key on the table.  It is unique for the cluster, not for the set.

If you try to add table bar in this example with table id 1, it will
fail because foo already has table id 1

Slony does not automatically assign table ID's, you specify them
manually through slonik.

Are you using admin tooling generate this for you?  There may be a layer
between you and Slony that is handling assigning the table id for you -
but Slony itself does not.

> merge set 2 to set 1
> 
> What will table id for bar be in set 1 now?

Merge set does not change the table id, it will be the same as before
the merge.


-- 
Brad Nicholson  416-673-4106
Database Administrator, Afilias Canada Corp.




More information about the Slony1-general mailing list