Advisory Locks
PostgreSQL Advisory Locks with pg_advisory_lock
PostgreSQL Advisory Locks with pg_advisory_lock Two scheduled jobs fire at the same minute and both try to process the same nightly batch. Nothing in the data stops them — there is no single row to lock, because the work has not produced rows yet. Row and table locks are the wrong tool here. What you want is a named …
Read More