On Thu, Jan 06, 2011 at 04:56:48PM +0100, Stefan Jakobs wrote:
> > In this case, it is not as critical to set such a flag, but it is important
> > to allow the existing scan to continue to completion, and ignore or
> > (just note) new requests until it does. Once a scan completes, new
> > scans can proceed either immediately (saved flag) or when next requested.
>
> That's what I have implemented. If a cleanup process is already running and a
> second cleanup process starts then the second process will quit as if the
> database was empty and it will log a warning
No warning is necessary. With a large database the cleanup thread may
run longer than the scheduled interval between threads. This is fine.
--
Viktor.