Troy Wolf troy at troywolf.com
Fri Jun 27 07:03:33 PDT 2008
Alexander (and others), I tested this and it works perfectly. Thanks,
Chris Browne. I know a lot of people use PERL scripts, etc. I use
"simple" bash shell scripts with the slonik commands. Here is a
snippet of my subscribe code. I have my common slonik preamble stuff
in a file named slonik_preamble.txt. I hope this helps you, Alexander:

slonik <<_EOF_
    include <./slonik_preamble.txt>
    subscribe set (id=1, provider=1, receiver=2, forward=yes);
_EOF_
RET=$?
if [ $RET -ne 0 ]; then
    echo ""
    echo "Your request to subscribe failed!"
    echo ""
    exit 2
fi

echo ""
echo "Your request to subscribe is in progress. We must now wait for the"
echo "subscription to complete. Normally, this will take no more than"
echo "30 seconds--depending on the size of the data. If it takes longer,"
echo "there may be an open transaction that is cramping our style."
echo ""

slonik <<_EOF_
    include <./slonik_preamble.txt>
    SYNC(id=1);
    WAIT FOR EVENT (origin=all, confirmed=2, wait on=1);
_EOF_
RET=$?
if [ $RET -ne 0 ]; then
    echo ""
    echo "There was a failure while waiting for the subscribe to complete!"
    echo "It is time to tail the slon logs to investigate."
    echo ""
    exit 2
fi

echo ""
echo "Your request to subscribe completed. Replication should now be working."
echo ""
exit 0


On Thu, Jun 26, 2008 at 1:52 PM, Alexander Staubo <alex at bengler.no> wrote:
>
> Perhaps, but it does not work here; I'm getting the same error as before.
>
> I am attaching the logs from both nodes. I have annotated them at the
> exact point where I run the sync and wait.
>
> Alexander.


More information about the Slony1-general mailing list