Transaction control #2741
-
Hi, I have a processing job that may take a few minutes to execute. I tried to implement it as a PROCEDURE as it allows transaction control and have intermediary commits after status updates. Thank you, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Oh, I happen to be working on procedure support. See #1210 (comment). @fusionbeam Could you share your procedure? |
Beta Was this translation helpful? Give feedback.
-
You could also think about implementing this as some kind of tasks queue to which you add with your request. A pg_cron background worker would then actually work on the queue and do the processing - maybe even in batches. pg_cron also allows you to run procedures and you could update the status in the tasks queue table. |
Beta Was this translation helpful? Give feedback.
You could also think about implementing this as some kind of tasks queue to which you add with your request. A pg_cron background worker would then actually work on the queue and do the processing - maybe even in batches. pg_cron also allows you to run procedures and you could update the status in the tasks queue table.