Home > Archive > Slony1 PostgreSQL Replication > July 2005 > Re: Fwd: Problem related to slony









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: Fwd: Problem related to slony
Christopher Browne

2005-07-12, 9:24 am

Ajay Dalvi wrote:

>---------- Forwarded message ----------
>From: Ajay Dalvi <dalvi_ajay- 7G5ni45KgYL8vmTbguxe
Sw@public.gmane.org>
>Date: 12 Jul 2005 12:39:46 +0530
>Subject: Problem related to slony
>To: cbbrowne- Re5JQEeQqe8AvxtiuMwx
3w@public.gmane.org
>
>
>
> 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.
Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com