Mon Jun 1 02:07:59 PDT 2009
- Next message: [Slony1-general] Slony bug and patch proposal
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hello! I am using it on FreeBSD systems for moving PostgreSQL databases between servers with minimum downtime, all works fine. But when I try to setup permanent master-slave schema some problems occured. Some times (accidentally) master system didn't generate sync events, and shutting down slon on master systems had long time. After debugging session, i found cause of problem (there is two problem, Slony and FreeBSD too). IMHO there is a logical mistake in slon/scheduler.c, in sched_mainloop fdsets copied for select before checking connections for their timeouts. In timeout case this descriptors will be removed with DLLIST_REMOVE and sched_remove_fdset, but stayed in select descriptors bit vector. There is a race condition: scheduler and libpq client polls same file descriptor and sometime scheduler select discover readable descriptor and lipbq poll blocks for infinte time :( I tested this on FreeBSD 7.0, trouble repeated in ~60% runs. I attach a patch, please, take a look on this code, it seems right, imho... Thank you, advance! -------------- next part -------------- A non-text attachment was scrubbed... Name: patch-scheduler Type: application/octet-stream Size: 1063 bytes Desc: not available Url : http://lists.slony.info/pipermail/slony1-general/attachments/20090601/7a651dc1/patch-scheduler.obj -------------- next part -------------- -- Cheers, Oleg A. Mamontov mailto: oleg at mamontov.net icq uin: 79-521-617 cell: +7-903-798-1352 -- Cheers, Oleg A. Mamontov mailto: oleg at mamontov.net icq uin: 79-521-617 cell: +7-903-798-1352
- Next message: [Slony1-general] Slony bug and patch proposal
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-general mailing list