Search Postgresql Archives

RowLock and multiple transactions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 real-world application (that acquires multiple locks on a number of relations) it seems that it is always the transaction that attempted to lock _last_ ... ? I thought that would most probably be random, or if it was not, the order would have been explained in the docs?


Thank you for any insights...
Best regards

	-hannes






[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux