Tue May 2 06:39:25 PDT 2006
- Previous message: [Slony1-general] i don't what know what exactly happening
- Next message: [Slony1-general] Unexpected MERGE SET results (Rod Taylor)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
And could someone please mark in FAT RED LETTERS (all caps please) that "wait for event" does not work for "subscribe" and that an immediately following "merge" cannot and will not work. The event to wait for before executing the "merge" is the ENABLE_SUBSCRIPTION created by the set origin when processing the SUBSCRIBE_SET. Slonik at this time has no clue when that even might happen. The only way to do it is to split the whole work into two slonik scripts and wait with other mechanisms until the newly subscribed tables actually appear in the subscribers sl_table config. For some reason almost everyone trying to add new tables stumbles over that problem. I presume our documentation is lacking here. Jan On 4/28/2006 6:29 PM, Melvin Davidson wrote: >> >> try { >> create set (id = 999, origin = 1, comment = 'merge set'); >> set add table (set id = 999, origin = 1, id = 999, fully qualified >>name = '$TAB'); >> } >> wait for event( origin = all, confirmed = all, wait on = 1, timeout >>= 0); >> echo 'Added $TAB to temporary set'; >> >> subscribe set (id = 999, provider = 1, receiver = 2, forward = no); >> wait for event( origin = all, confirmed = all, wait on = 1, timeout >>= 0); >> echo 'Subscribed $TAB'; >> >> merge set (id = 667, add id = 999, origin = 1); >> wait for event( origin = all, confirmed = all, wait on = 1, timeout >>= 0); >> echo 'Merged $TAB'; > > If you are going to use a variable for a table name, _do not_ enclose it in quotes. > In your case, slony is now looking for a table named $TAB. > > The correct statement should be > set add table (set id = 999, origin = 1, id = 999, fully qualified name = $TAB); > > Good luck, and may the bytes be with you. > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Slony1-general mailing list > Slony1-general at gborg.postgresql.org > http://gborg.postgresql.org/mailman/listinfo/slony1-general -- #======================================================================# # It's easier to get forgiveness for being wrong than for being right. # # Let's break this rule - forgive me. # #================================================== JanWieck at Yahoo.com #
- Previous message: [Slony1-general] i don't what know what exactly happening
- Next message: [Slony1-general] Unexpected MERGE SET results (Rod Taylor)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-general mailing list