Tue Feb 28 06:32:54 PST 2006
- Previous message: [Slony1-general] Example of adding a table to an existing set ... ?
- Next message: [Slony1-general] Example of adding a table to an existing set ... ?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Marc G. Fournier wrote: >Looking at http://linuxfinances.info/info/addthings.html, I'm wondering if >someone has an example slonik script that would add one table to an >existing set, where one is dealing with a single slave? > >Is it as simple as: > > Yes (besides a a typo in the merge set - extra 9) >slonik <<_EOF_ > CREATE SET ( ID = 999, ORIGIN = 1, COMMENT = 'Add New Table' ); > > SET ADD TABLE ( > SET ID = 999, > ORIGIN = 1, > ID = 20, > FULLY QUALIFIED NAME = 'public.newtable', > COMMENT = 'New Table To Add' > ); > > SUBSCRIBE SET ( > ID = 999, > PROVIDER = 1, > RECEIVER = 2, > FORWARD = YES > ); > > MERGE SET ( ID = 1, > ADD ID = 9999, > ORIGIN = 1 ); > >_EOF_ > >Now, I'm guessing right now, but PROVIDER/RECEIVER can "reuse" the ones >that are already defined as part of the original replication set, I don't >need to create new ones just for the temporary set, do I? > > > These are on a set by set basis, the fact that they are defined for another set is irrelevant. >Also, is there a way in slonik of telling SET ADD TABLE to use the next >available ID, or do I have to query the sl_table for 'max(tab_id) + 1' >before I setup the script? > > > No way to do it automatically. >And, finally, I hope ... MERGE SET automatically gets rid of the TEMP SET >that I'm creating for this purpose, or do I need to remove that after its >MERGEd? > > Once you merge, set 999 will indeed be gone. -- Brad Nicholson 416-673-4106 Database Administrator, Afilias Canada Corp.
- Previous message: [Slony1-general] Example of adding a table to an existing set ... ?
- Next message: [Slony1-general] Example of adding a table to an existing set ... ?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-general mailing list