What's the difference between waiting for a lock, NOWAIT, and SKIP LOCKED?
Several workers are pulling jobs from a queue table at the same time. Some rows are already locked by other transactions. Explain what happens with a regular FOR UPDATE and how the behavior changes with NOWAIT and SKIP LOCKED. Which option would you choose for a job queue? What if you need to process a specific record and can't skip it?
ExplainTransactions and locksMiddleBackendData Engineer