citusdata / citusdata/pg_cron

[FEATURE REQUEST]: execute jobs scheduled at the same time sequentially

Open
#121 0 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

My use case is the need to schedule some jobs which have to mount and unmount smb shares on the db server to to some file operations (shellscript executed via plpy procedure in postgresql). The schedule depends on data in the database, is automatically generated and updated by triggers, and it is likely that similar jobs will have to happen similarly. Every job needs to have its unique jobid.
As expected, this causes errors when mounting/unmounting.
Is there any option in pg_cron to bring jobs with the same schedule in queue?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating pg_cron's scheduler and job-execution entry points, then trace how jobs with the same schedule are dispatched. Compare that behavior with the requested per-schedule queueing and define done as same-schedule jobs running sequentially while each retains a unique jobid, with focused coverage for concurrent jobs.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, postgresql, shell
Domain
backend, databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.