Alan Hodgson ahodgson at simkin.ca
Thu Jan 29 12:04:17 PST 2009
On Thursday 29 January 2009, Geoffrey <lists at serioustechnology.com> wrote:
> Andrew Sullivan wrote:
> > On Thu, Jan 29, 2009 at 12:35:36PM -0500, Geoffrey wrote:
> >> So I would not add it to an existing set, I would simply create a new
> >> set, with that table in it?  That really is a better approach then I
> >> was considering.
> >
> > That's in fact the only way to do it.  You can't add a new table to an
> > existing set.  This is covered in the manual.
>
> Ouch, seems I missed that detail, thanks.


There is a mostly undocumented function that can add an empty table to an 
existing set. It's buggy; you have to make sure the execute script that 
runs it is applied to exactly the same set, and if the table has foreign 
keys pointed to it it will break due to the use of truncate on the slaves, 
but it works otherwise:

select _cluster.add_empty_table_to_replication (set id, table id, schema, 
table_name, index name, comments)

 ... run in an execute script.



-- 
Current Peeve: The mindset that the Internet is some sort of school for
novice sysadmins and that everyone -not- doing stupid dangerous things
should act like patient teachers with the ones who are. -- Bill Cole, NANAE 


More information about the Slony1-general mailing list