Select unlocked row in Postgresql

后端 未结 14 2052
你的背包
你的背包 2020-12-13 06:20

Is there a way to select rows in Postgresql that aren\'t locked? I have a multi-threaded app that will do:

Select... order by id desc limit 1 for update
         


        
14条回答
  •  囚心锁ツ
    2020-12-13 06:38

    Since I haven't found a better answer yet, I've decided to use locking within my app to synchronize access to the code that does this query.

提交回复
热议问题