Re: RowLock and multiple transactions

2024-02-14 Thread Laurenz Albe
On Wed, 2024-02-14 at 23:52 +0100, Hannes Erven wrote: > when "SELECT .. WHERE .. FOR NO KEY UPDATE" is used synchronize access, > and the transaction holding the lock completes, how does PostgreSQL > decide /which one/ of multiple waiting transactions will the lock be > granted to next? > > In

RowLock and multiple transactions

2024-02-14 Thread Hannes Erven
Hi, when "SELECT .. WHERE .. FOR NO KEY UPDATE" is used synchronize access, and the transaction holding the lock completes, how does PostgreSQL decide /which one/ of multiple waiting transactions will the lock be granted to next? In my testing (on Ubuntu 16.1-1.pgdg20.04+1, 64bit) with a re