Question on locking

Поиск
Список
Период
Сортировка
От Steve Tucknott
Тема Question on locking
Дата
Msg-id 1099640185.1245.15.camel@retsol1
обсуждение исходный текст
Ответы Re: Question on locking  (Michael Fuhr <mike@fuhr.org>)
Re: Question on locking  (Terry Lee Tucker <terry@esc1.com>)
Re: Question on locking  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-novice
PostGreSQL 7.4.5

If I have the situation where process 1 has selected record1 from table a for update and then process 2 tries to do the same, am I right in assuming that process 2 will wait until the first process completes the transaction (I've looked at Chapter 12 and this is intimated).
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?
Is the suggested route to interrogate the system tables prior to selecting for update, to see if a lock has been applied?

Normally we wait on locks , so this is not an issue.


Regards,

Steve Tucknott

ReTSol Ltd

DDI: 01903 828769

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

Предыдущее
От: "John-Paul Delaney"
Дата:
Сообщение: Re: pg_ [dump & restore] invalid archive problem
Следующее
От: "M. Bastin"
Дата:
Сообщение: Re: Question on locking