Tue Jul 12 15:42:06 PDT 2005
- Previous message: [Slony1-general] about Execute SQL/DDL script and add new Subscribing Nodes to existing set
- Next message: [Slony1-general] Re: Fwd: help
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Ajay Dalvi wrote: >---------- Forwarded message ---------- >From: Ajay Dalvi <dalvi_ajay at extenprise.net> >Date: 12 Jul 2005 12:39:46 +0530 >Subject: Problem related to slony >To: cbbrowne at gmail.com > > > > Hi Christopher, > > I want to ask one problem that I am getting while using slony1.1.0 > > The scenario I am following is > I am having one Master and two slave nodes. > I have configured them properly. > Now I have written one automated script. In this script I first start >"slon" process for master and for > each slave. The I subscribe each slave for particular set one at a >time. Now since i don't want the replication process to be run >continuously, I am looking message "copy set [set no] done" in the >logs. As soon as I get this message, I am unsubscribing that node. >After that same process is followed for other slave node. > Now the problem I am getting is that. Sometimes the node is >not getting unsubscribed from the set. So when I run my srcipt once, >it does the replication and comes to an end. Now when next time I run >that script, it is giving me following error. > > ------------------------------------------------------------------------------------------------------- > "select "_cistera_cluster".setAddTable_int(1, 1, >'"public"."component_properties"', 'name_pk', 'Table >component_properties'); " PGRES_FATAL_ERROR ERROR: Cannot insert a >duplicate key into unique index sl_table-pkey" > ------------------------------------------------------------------------------------------------------- > > I think this is just because the node is not getting unsubscribe when >last time the script gets executed. > > One more thing is that, to konw that replication is over and to stop >the slon prcess, I am looking log entries for message "copy set [set >no] done". When i get this message, I am immediately unsubscribing >the node. So is there any more message I should also look in to the >loggs before unsubscribing the node to overcome above error that I am >getting? > > So if you can give me any suggessions, about why is this happening...... > > In future, please forward messages to the Slony-I mailing list (see http://gborg.postgresql.org/mailman/listinfo/slony1). It seems likely that the problem you are running into is that the unsubscribe event isn't propagating as quickly as you want it to. I would think that better ways to detect that the set is *TRULY* subscribed would include: 1. Watching other nodes for the confirmation of the subscription event. 2. Watching other nodes for confirmation of SYNC events on the new subscriber node. 3. Looking at sl_subscribe on the subscriber to see if the set is marked as subscribed. It is marked as NOT subscribed there until the COPY_SET event completes.
- Previous message: [Slony1-general] about Execute SQL/DDL script and add new Subscribing Nodes to existing set
- Next message: [Slony1-general] Re: Fwd: help
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-general mailing list