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

[YSQL] Handle backup for pg_cron tables

Open sushantrmishra opened this issue 2 years ago • 0 comments

Jira Link: DB-1027

Description

pg_cron table creates two tables in system_platform database.

  1. job description table which contain the information about scheduled jobs.
  2. 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.

sushantrmishra avatar Apr 09 '22 20:04 sushantrmishra