Detect Locked Row Without Blocking

Поиск
Список
Период
Сортировка
От Joe Lester
Тема Detect Locked Row Without Blocking
Дата
Msg-id b88164e8e1d59d4801253516ae3987a3@sweetwater.com
обсуждение исходный текст
Ответы Re: Detect Locked Row Without Blocking  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
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.



В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Connect to a database in a .sql file
Следующее
От: Richard Huxton
Дата:
Сообщение: Re: Connect to a database in a .sql file