Search Postgresql Archives

Detect Locked Row Without Blocking

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

 



Is there a recommended "postgres way" to determine if a certain row is locked... without blocking?

In my custom postgres client app I'd like to be able to determine if another user is "modifying" a given record. If so, I would present a dialog to the user such as "Record Locked. Sam Smith is already modifying this record. Try again later."

I've looked at SELECT FOR UPDATE which looks good except for that it blocks. I don't want my UI to freeze up... I just want to notify the user that it's locked and move on. Any thoughts?

Thanks.



---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

              http://archives.postgresql.org

[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 Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux