Skip to content

Coordinated Interval Chain Execution across multiple clients #662

@radim

Description

@radim

Is your feature request related to a problem? Please describe.
The current behavior of pg_timetable supports non-cron syntax like @after. However, when implementing interval chains, I noticed that they are executed on all clients unless the chain is specifically bound to a particular client. This results in redundant execution across multiple clients.

While there's active_chain table to control scheduler concurrency, it does not provide support for this particular case (as the records are deleted).

Describe the solution you'd like
To improve scalability, it might be helpful to extend the coordination mechanism to specifically support interval tasks within the timetable schema. Introducing new logic/altering existing active_chain logic would solve this and allow coordinated execution of those chains in scalable environment (including dynamically created clients).

Describe alternatives you've considered
As mentioned above the 'workaround' is to use client affinity, but in that case the orchestration of the workload would be outside the pg_timetable.


I would like to check what do you think about possible solutions. Either extending action_chain to support UPSERT like behaviour together with active (true/false), instead of INSERT/DELETE as it is at the moment. Or whatever it would be better to come up other mechanism.

Metadata

Metadata

Assignees

Labels

questionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions