| От | Tom Lane |
|---|---|
| Тема | Re: a SELECT FOR UPDATE question |
| Дата | |
| Msg-id | 5855.1108090630@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: a SELECT FOR UPDATE question (Michael Fuhr <mike@fuhr.org>) |
| Список | pgsql-general |
Michael Fuhr <mike@fuhr.org> writes:
> It sounds like the best a check could do would be the amazingly
> astute "some transaction held a lock on this row at one time and
> may or may not still hold that lock, and even if it did when you
> checked it might have gone away by now and some other transaction
> that you don't know about might hold a lock."
> Does that about sum it up? ;-)
Yeah. Really, if you want to inspect the state of a lock,
the only meaningful operation is to try to acquire the lock.
It's reasonable to offer an "acquire only if immediately available"
operation --- but reporting on the instantaneous state seems
pretty useless by itself.
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера