| От | Tom Lane |
|---|---|
| Тема | Re: Question on locking |
| Дата | |
| Msg-id | 26299.1099668833@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Question on locking (Steve Tucknott <steve@retsol.co.uk>) |
| Список | pgsql-novice |
Steve Tucknott <steve@retsol.co.uk> writes:
> How can I detect the lock on process 2? I want to be able to tell the
> user that the row is tentatively locked and to allow them to abort the
> update attempt. I can't see a 'SET LOCK MODE TO NOT WAIT' style command,
> so how do I stop process 2 from waiting?
I see the thread moved off in a different direction, but to answer your
original question: what I'd probably do is set STATEMENT_TIMEOUT to the
maximum length of time I was willing to wait for the lock. (This
assumes of course that the time spent to find the row is reasonably
predictable, since you have to allow for that too.)
regards, tom lane
В списке pgsql-novice по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера