slony1-bugs at lists.slony.info slony1-bugs at lists.slony.info
Wed Apr 2 08:23:38 PDT 2008
http://www.slony.info/bugzilla/show_bug.cgi?id=47

           Summary: EXECUTE SCRIPT runs on ALL nodes
           Product: Slony-I
           Version: 1.2
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: medium
         Component: stored procedures
        AssignedTo: slony1-bugs at lists.slony.info
        ReportedBy: johan at headweb.com
                CC: slony1-bugs at lists.slony.info
   Estimated Hours: 0.0


Hello

I'm running 1.2.9 (altough this seems to be accurate for CVS too) against pg
1.2. I just did an EXECUTE SCRIPT with a simple ALTER command. I have two sets,
three nodes. Two masteres (1 and 2), with one set each, replicates each set to
the one single slave (101).
The ALTER was performed on set 1, with no "EXECUTE ONLY ON" parameter.
So, what I expected here was that the ALTER command should be executed on node
1 and node 101, and node2 not touched. But instead the slon running against
node2 borked. Looking at the logs, it showed that it was trying to run the
ALTER TABLE command against that database. Which ofcourse failed since that
database did not have set 1 (this one was master for set 2).

Looking closer I found
http://slony.info/documentation/function.ddlscript-prepare-int-integer-integer.html
and in particular this part:

        if v_set_origin <> v_no_id
                        and not exists (select 1 from sl_subscribe
                                                where sub_set = p_set_id
                                                and sub_receiver = v_no_id)
        then
                return 0;
        end if;


Now if im right here, that would be pseudocode :

IF the origin node for this set is not me, AND i dont subscribe to this set,
then abort without errors..

Now.. that sounds wrong? Shouldnt that be 


IF the origin node for this set is not me, OR i dont subscribe to this set,
then abort without errors..


Do I just need to sleep and check my subscription setups (which looks fine to
me in sl_subscribe, node 2 is not a subscriber of ANYTHING), or is this wrong?

In the meantime I guess one can run EXECUTE ONLY ON=101, which isnt very much
problem here in my dev setup, but more of a problem when you have many slaves i
guess.

Otherwise, thanks for a, even if somewhat tricky to administer, product! :) 

Regards
Johan


-- 
Configure bugmail: http://www.slony.info/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
You are the assignee for the bug.


More information about the Slony1-bugs mailing list