citusdata / citusdata/pg_cron

cron jobs do nor work at scheduled time and can not create a new job

Open
#249 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
3.9k
Forks
260
Avg merge
5d 5h
Merged PRs (30d)
1

Description

Hi,

We were using PostgreSQL 13.7, and the "cron jobs" **stopped** suddenly after the database shut down and didn't **restart** again at the scheduled time.
We have upgraded the database from 13.7 to **13.10**. After upgrading (also db restarted), the jobs started again.

But, we faced another issue while creating a new job with job-name parameter.

**Execution 1:** Job could not be created.
> SELECT cron.schedule('vacuum_my_db_table', '0 04 * * *', 'VACUUM ANALYZE my_db_table')
This execution throws the following error:
**"ERROR: invalid memory alloc request size [N]"**

**Execution 2:** Db could not be reachable.
> SELECT cron.schedule('xxxx', '0 04 * * *', 'VACUUM ANALYZE my_db_table')
This execution throws the following error:
**"FATAL: the database system is in recovery mode"**

After this error, the is not accessible, but AWS RDS monitoring says "it is available."
It looks like the function considers the "name parameter" as scheduled time.

**Execution 3:** It worked, and the job was created.
> SELECT cron.schedule('0 04 * * *', 'VACUUM ANALYZE my_db_table')

In summary, the **cron.schedule** function can not be **executed** with three parameters (named job), and causes db to **be unreachable**.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.