cbbrowne at ca.afilias.info cbbrowne
Sun Nov 14 07:33:14 PST 2004
> I guess my little problem was a bit vague, but I'm somewhat surprised
> no-one
> thought of what now seems like the obvious reason that slon wouldn't
> start. I
> was right in that node 2 died on the DDL SCRIPT. Then, everytime I tried
> to
> restart slon, it re-received the event, and died again. I'm still quite
> confused as to why the script fails on only this node (especially since
> the
> exact same script succeeds when run from psql).
>
> Anyways, I need to get this problem fixed, which means one of three
> things:
> deleting the DDL SCRIPT event from node 1, adding a fake confirmation from
> node 2, or changing the script itself (the one saved in sl_event) to
> something
> that will definitely succeed.
>
> Can anyone tell me which would be the best solution, and more importantly,
> how
> to do it safely?

This is _exactly_ the sort of scenario where EXECUTE SCRIPT breaks down in
a "pathological" manner which is why using it at all "gives me the
willys."

I think you have a fourth option, namely

4.  Before restarting the slon on the subscriber node, make whatever
change is needed to allow the DDL script to run successfully.

Thanks for pointing out the list of "possible things to do;" it certainly
demonstrates why I feel uneasy any time someone proposes the use of
"EXECUTE SCRIPT."

I hate all of the answers :-) but I expect you will indeed have to pick
one of them.

I probably ought to mess around with this in a test environment to see
just how evil each of those alternatives are.  They are all pretty horrid,
not the least of the reasons being that not one of the alternatives can be
considered idempotent.

I've written up an upgrade function for Slony 1.1 which adds a field to
table sl_node.  It is in fact idempotent; it checks to see if the field is
there or not, and only adds it if it needs to.  Running it 5 extra times
will work out OK.

That kind of approach is what's needed for this sort of thing.

Alas, that's not an answer to your problem; it pretty much just says
"Yeah, it's a problem."
-- 
http://cbbrowne.dyndns.info:8741/cgi-bin/twiki/view/Sandbox/SlonyIAdministration



More information about the Slony1-general mailing list