Dave Page wrote:
>Yes, I'm aware of that issue - and even the current design will have
>problems in that jobs may stil run late.
>
Better late than never.
> I think the correct way to
>address this is to grab all due jobs, and spawn a separate thread to
>handle each. This should allow jobs to actually start when they are
>supposed to.
>
>
Well, yes, hm...
Threading is nice, but not a guarantee to be exactly on-time for job starts.
The design is basically able to be run by multiple process instances of
pgAgent (on different machines), this would get quite impossible without
further control. A combination seems the best:
- a job that is due to run will be running as soon as possible
- any instance of pgAgent might be configured to run a job threaded
- multiple instance may share the pool of due tasks
- all together, instances and threads try to execute the schedule asap.
IIRC, that was my original intention, those days.
Regards,
Andreas