Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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.