Alexander Staubo alex at bengler.no
Wed Jun 25 12:20:02 PDT 2008
On Wed, Jun 25, 2008 at 7:59 PM, Christopher Browne
<cbbrowne at ca.afilias.info> wrote:
> However, there *is* a way to WAIT FOR EVENT that you should be able to
> expect to work, and if it doesn't there's something buggy going on.
>
> You submit the subscription, but THEN you submit a SYNC event.  *That*
> event has got to get processed *after* the subscription work is done.
> And you can wait on THAT.

Are you gusy even reading my original message? I am doing exactly this
-- I do a "wait for event", then a "sync", then a wait again --
exactly as described by the Slony 1.2 documentation:

  http://www.slony.info/documentation/addthings.html

...from which I quote:

> If you wish to know, deterministically, that each subscription has completed,
> you'll need to submit the following sort of slonik script for each subscription:
>
> SUBSCRIBE SET (ID=1, PROVIDER=1, RECEIVER=2);
> WAIT FOR EVENT (ORIGIN=2, CONFIRMED = 1);
> SYNC(ID = 1);
> WAIT FOR EVENT (ORIGIN=1, CONFIRMED=2);

The problem is that I cannot get this to *work*.

As for Troy's suggestion that manually check when the subscription is
complete, that's not an acceptable solution. My goal is to simplify
the deployment of Slony-based databases, not complicate it; the code I
am writing is part of a deployment framework that needs to be
automated, so I am completely dependent on being able to interact with
Slony in a stable, predictable fashion.

Instead of issueing a "wait for event", I have tried looking at the
sl_subscribe table on the slave node and seeing if it has an entry
with sub_active set to true. Unfortunately, this entry seems to be
present even before the subscription has been enabled.

Alexander.


More information about the Slony1-general mailing list