Instead of changing the default for all OSs, sounds like
some Windows specific changes may need to be done. Has anyone
using Windows actually seen this or confirmed this is
possible??

> On Sep 2, 2015, at 5:08 AM, Yann Ylavic <ylavic....@gmail.com> wrote:
> 
> Re PR 58024.
> 
> AIUI, balancers (and members) SHM slots are destroyed (and the
> underlying base file removed) with pconf before restarting and then
> re-created after (according to the new configuration, eg. number of
> balancers/members, be it the same or not).
> Persisted slots are saved in their own file (with the .persit suffix),
> and reused (copied) only if the configuration did not change in
> between.
> (@Jim, I see now how this is better than attaching ;)
> 
> This works well on Unixes, but on Windows files can't be removed
> (unlinked) while any process/thread hold an HANDLE on it, hence until
> all the children have exited...
> Thus, since the SHM files still exist on restart, the balancer code
> tries to attach them instead of re-creating, and issues the checks on
> the existing size to fit the reloaded configuration, and fail should
> should any balancer/member be added or removed => PR 58024.
> 
> BTW, even on Unixes there is a race on these files between the main
> process and the children, or the children themselves from different
> "generation".
> 
> So I wonder if we could use anonymous SHMs instead (or mktemp based
> when not native), persisted slots are saved in their own files anyway
> and won't be affected.
> Otherwise, maybe we could use the "generation" as part of the file
> name, but that's equivalent and more complex IMO.
> 
> Thoughts?

Reply via email to