Wed Jun 10 08:04:08 PDT 2009
- Previous message: [Slony1-general] Slony bug and patch proposal
- Next message: [Slony1-general] Version 2.x rpms?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 6/1/2009 5:07 AM, Oleg A. Mamontov wrote: > 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... No need for a test case, Chris. A quick look at the code reveals that Oleg is indeed right. Patch applied. Good work, thank you. Jan -- Anyone who trades liberty for security deserves neither liberty nor security. -- Benjamin Franklin
- Previous message: [Slony1-general] Slony bug and patch proposal
- Next message: [Slony1-general] Version 2.x rpms?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-general mailing list