Re: [HACKERS] FOR SHARE LOCK clause ? - Mailing list pgsql-hackers

From Vadim Mikheev
Subject Re: [HACKERS] FOR SHARE LOCK clause ?
Date
Msg-id 3692E66B.5011E04A@krs.ru
Whole thread Raw
In response to Re: [HACKERS] FOR SHARE LOCK clause ?  (Bruce Momjian <maillist@candle.pha.pa.us>)
Responses Re: [HACKERS] FOR SHARE LOCK clause ?  (Bruce Momjian <maillist@candle.pha.pa.us>)
List pgsql-hackers
Bruce Momjian wrote:
> 
> > > >
> > > > 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.
> 
> So you are going to shared lock every row.  And if a user does a
> sequential scan of the entire table using SELECT FOR SHARE LOCK, he
> shared locks every row.  Isn't he going to run out of locks?

I would like to work with this issue after 6.5 and writes
some notes about FOR SHARE LOCK limitations/problems.

Vadim


pgsql-hackers by date:

Previous
From: Vadim Mikheev
Date:
Subject: Re: [HACKERS] FOR SHARE LOCK clause ?]
Next
From: Vadim Mikheev
Date:
Subject: Re: [HACKERS] FOR SHARE LOCK clause ?