yugabyte-db icon indicating copy to clipboard operation
yugabyte-db copied to clipboard

[YSQL]Add support for pg_cron extension module for YSQL

Open adil246 opened this issue 3 years ago • 3 comments

Jira Link: DB-1350 Issue This feature would be benefical in scheduling tasks using pg_cron. Not able to enable pg_cron extension. It doesn't look like it is prebundled in the distro.

yugabyte=# create extension pg_cron;
ERROR:  could not open extension control file "/home/yugabyte/yb-software/yugabyte-2.4.5.0-b20-centos-x86_64/postgres/share/extension/pg_cron.control": No such file or directory
yugabyte=

adil246 avatar Jul 28 '21 16:07 adil246

Roadmap for the pg cron extension.

Phase 1 - Initial port of pg_cron

Status Feature GitHub Issue Comments
Done Add UUID to yb_servers() function #11906
Done Pg Cron extension #11907
In Progress Tserver Pg Cron Service #11908
Resolve Multiple Leader Scenarios #12121
Dynamic Pg Cron Service launching #11909
Handle backup for pg_cron tables #12091

xenown avatar Mar 04 '22 00:03 xenown

Did this issue "go somewhere" ? any other attempt at "scheduler" ? pg_cron compatible system would be nice, but I Acknowldge that may not be easy on a yugabyte distributed system.

pdvmoto avatar Aug 15 '23 11:08 pdvmoto

Note: a Working Scheduler, be it pg_cron or other, will definitely enhance the YB offering. This scheduler would have to come “inside” the database, as the yb-deployments could be servers. vms, contaiers, or whatever: none of those components is able to “own” the schedule. A scheduler would probably need “master+followers” very similar to how tables+tablets are managed, and possibly it would re-use some of the concepts used to guarantee atomicity+sharding on Tables but then applied to "schedule-lists", to guarantee the correct running of a schedule-queue (non-repudiation is one, guaranteeing a finished-job is another, and many more aspects of a scheduler can come into play such as dependencies. Dobnt try to make it too fancy, start by imitation pg_cron?)

pdvmoto avatar Aug 15 '23 11:08 pdvmoto