I'm setting up some pg_cron jobs using Ansible, and was hoping to just call the schedule_in_database function on each deployment, as this will not create a job that already exists. However, I discovered that it does consume a value from the jobid_seq sequence even when it does not insert a new row, which is suboptimal as that will mean that my deployment scripts burn through a lot of sequence values unnecessarily. The column is a 64-bit integer which seems really overkill but should prevent this from becoming an actual problem in practice, but it would still be nice if it didn't consume sequence values unnecessarily.
I'm setting up some pg_cron jobs using Ansible, and was hoping to just call the
schedule_in_database
function on each deployment, as this will not create a job that already exists. However, I discovered that it does consume a value from thejobid_seq
sequence even when it does not insert a new row, which is suboptimal as that will mean that my deployment scripts burn through a lot of sequence values unnecessarily. The column is a 64-bit integer which seems really overkill but should prevent this from becoming an actual problem in practice, but it would still be nice if it didn't consume sequence values unnecessarily.