Christopher Browne cbbrowne at ca.afilias.info
Fri Apr 11 08:50:02 PDT 2008
Alan Hodgson <ahodgson at simkin.ca> writes:
> I would like to start making use of this function to add new tables, but I'm 
> having trouble making sense of it.

Did I make any comment on this?

> How would one actually use this function? Run it through a DDL script? The 
> docs seem to imply that.

Yes, that's right.

> Why does the function call alterTableRestore at the end? That seems wrong; 
> calling the function seems to add the table to a set on the local node but 
> it leaves it in a non-replicated state.

Actually, while a bit nonintuitive, that *is* correct.

If you're running this function within an "EXECUTE SCRIPT" request,
the cleanup portion of "EXECUTE SCRIPT" goes back and alters tables to
put them into replicated state.

Thus, add_empty_table_to_replication() doesn't need to put the table
into replicated state - we can depend on EXECUTE SCRIPT to handle
that.

> Also, what happens if that script executes on a node that is neither
> an origin or a subscriber to the table? It would appear that it
> doesn't actually check if the table should be touched on the local
> node.

That could be; I'll have to think about that...
-- 
let name="cbbrowne" and tld="linuxfinances.info" in name ^ "@" ^ tld;;
http://linuxdatabases.info/info/emacs.html
"Though the Chinese should adore APL, it's FORTRAN they put their
money on." -- Alan J. Perlis


More information about the Slony1-general mailing list