yugabyte-db
yugabyte-db copied to clipboard
[YSQL] Handle backup for pg_cron tables
Jira Link: DB-1027
Description
pg_cron
table creates two tables in system_platform database.
-
job description
table which contain the information about scheduled jobs. - Another table named
job_run_details
which contains the running jobs across different nodes.
The tables can not be restored on another node as then may contain the name of nodes from the cluster.
For backup/restore few options available :
-
Skip
job_run_details
during backup or restore. -
For
job description
table name of the nodes in the columns is cleared. The reason is following.- Name of the nodes will be different on new cluster.
- Though since restore can happen on different configuration, so not possible to restore the jobs with some mapping from source cluster where the backup was taken.
It has side effect that job could be scheduled at any given node rather then as intended to run on any given node.