Ask Your Question
1

What is preventing the execution of several jobs simultaneously in pgcron?

asked 2023-05-22 13:41:40 +0000

qstack gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2023-05-22 14:01:02 +0000

devzero gravatar image

Pgcron is a PostgreSQL extension that allows you to schedule and execute jobs or tasks at specific intervals. However, by default, PostgreSQL executes only one task at a time. This is because PostgreSQL uses a shared buffer cache and locking mechanisms that prevent multiple transactions from accessing the same data at the same time. If multiple tasks were allowed to execute simultaneously, they could potentially update or access the same data, leading to data inconsistencies and conflicts. Therefore, to prevent this, Pgcron limits the execution of tasks to one at a time.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-05-22 13:41:40 +0000

Seen: 14 times

Last updated: May 22 '23