Re: [HACKERS] FOR SHARE LOCK clause ?

Поиск
Список
Период
Сортировка
От Vadim Mikheev
Тема Re: [HACKERS] FOR SHARE LOCK clause ?
Дата
Msg-id 3692E38A.DB98A315@krs.ru
обсуждение исходный текст
Ответ на Re: [HACKERS] FOR SHARE LOCK clause ?  (Bruce Momjian <maillist@candle.pha.pa.us>)
Ответы Re: [HACKERS] FOR SHARE LOCK clause ?  (Bruce Momjian <maillist@candle.pha.pa.us>)
Список pgsql-hackers
Bruce Momjian wrote:
> 
> > > I think lock escalation is nice.  Locking every row makes for lock
> > > resource problems.  I would recommend locking a single row, and if a
> > > second row needs to be locked, just escalate to lock the whole table...
> > > if that can be done.  This would seem to be the most reasonable and
> > > easiest to do.
> >
> > Easiest to do is don't worry about # of locks -:)
> > Let's be on this way for 6.5
> 
> You mean just share-lock the whole table.  I agree.  It is a pretty rare
> situation.

No. User may use LOCK TABLE IN SHARE MODE for this.
I propose SELECT FOR SHARE LOCK as alternative to
LOCK TABLE IN SHARE MODE and SELECT FOR UPDATE and
would like to share lock each row selected with
FOR SHARE LOCK clause in use. I don't know what's
real limitations of # locks, but I think that
a tens of locks is Ok.

Vadim


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] FOR SHARE LOCK clause ?
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] FOR SHARE LOCK clause ?