Steve Singer ssinger at ca.afilias.info
Thu Oct 28 11:05:08 PDT 2010
On 10-10-28 06:15 AM, Jason Chen wrote:
> Hi,
>
> When I tried to deploy slony-2.0.4, there have a problem I met during
> slave node configuration. Maser node slon process looks hang and there
> is *<event pending>* in pa_conninfo of sl_path table. Below is the
> output of that table.
>
> [root at slony-r1s1-001 ~]# psql -U postgres system.db -c "select * from
> _slony.sl_path"
>   pa_server | pa_client |
> pa_conninfo                                       | pa_connretry
> -----------+-----------+-----------------------------------------------------------------------------+--------------
> 2 |         1 | host=192.168.11.12 dbname=system.db user=postgres
> port=5432|           10
> 1 |         2 | <event
> pending>
> |           10
>
>
> Here is the configuration sequence I used to setup master and slave, I
> used atlperl related tools to configure slon.
> _*On master node:*_
>
>    1. Configure and start postgresql service
>    2. Configure slon using slonik_init_cluster and
>       slony_define_replication_set
>    3. Start slon service
>
> _*On slave node:*_
>
>    1. Configure and start postgresql service
>    2. Configure slon using slonik_store_node and slonik_subscribe_set
>    3. Start slon service
>
> The incorrect configuration in sl_path will cause master node hangs and
> master will not generate any new SYNC event. However, *after about 7
> hours, *the information in sl_path becomes correct configuration and
> SYNC event can be generated.
>
> After check slony source, I was thinking the issue might happen during
> subscribeSet and add some logs in backend script slony1_funcs.sql.
> However, it looks like subscribeSet and enableSubscription finished
> successfully from slon log. I also checked slon thread info, there is no
> remoteListenThread_main and remoteWorkerThread_main thread comparing
> with normal slon process in the master node.
>
> My question are:
>
>    1. Is there any other things we can check in the slony table or logs?
>    2. Why there need to wait for 7 hours for that correct sl_path? Does
>       there has anything block master node?

My question is what were the slons doing during those 7 hours.

If you configure your slon processes to log at the debug level they 
should print a fair amount of stuff.

You get the <event pending> entries in sl_path when you subscribe the 
set before processing the STORE_PATH message on the other node.

What maybe want to do is move define_replication_set to come after 
you've started up the slons.

Having said that even if you do things in the order you described things 
still should have worked and I don't see why it took 7 hours to update 
sl_path.  What were the slons doing during those 7 hours.



>    3. Do you think this is a configuration issue or issue inside slony
>       source code?
>
>
> Thanks,
> Jason
>
>
>
> _______________________________________________
> Slony1-hackers mailing list
> Slony1-hackers at lists.slony.info
> http://lists.slony.info/mailman/listinfo/slony1-hackers



More information about the Slony1-hackers mailing list