Troy Wolf troy at troywolf.com
Wed Jun 25 10:21:36 PDT 2008
>> If, like the user in the link you provided, you are trying to
>> SUBSCRIBE, then use WAIT FOR EVENT to know when the SUBSCRIBE has
>> completed, then your problem is that this does not work. WAIT FOR
>> EVENT is unable to reliably know when the subscribe has completed, and
>> you cannot MERGE SET until the SUBSCRIBE completes.
>>
>> You'll probably notice that if you wait long enough--usually a few
>> seconds depending on your data size--the MERGE will work.
>
> Correct on both counts.

Then you do not have a problem. What I tried to convey is that you
cannot do WAIT FOR EVENT. To my knowledge, all you can do with a
subscribe is manually wait for it to finish. You can do this by
watching the logs and noticing when the subscribe completes.
Alternatively, you can do what I do--I have a script that does the
subscribe then pauses waiting for me to hit ENTER to continue with the
MERGE. I simply wait 10 seconds or so then hit ENTER. If the MERGE
fails, I just assume the subscribe is still in process and go back to
the code that prompts the user to wait and hit ENTER when ready for
the MERGE. If I were to automate this script, I'd probably catch the
MERGE failure, go into a wait, then try again. Each time it fails, I'd
double my wait. Perhaps fail 10 times before giving up with a fatal
error.


More information about the Slony1-general mailing list