Re: Row Level Locking Problem - Mailing list pgsql-hackers

From Hannu Krosing
Subject Re: Row Level Locking Problem
Date
Msg-id 39A14D55.EE60D5F@tm.ee
Whole thread Raw
In response to Row Level Locking Problem  ("Cray2" <cray2@mail.com>)
List pgsql-hackers
Cray2 wrote:
> 
> Hi
> 
>     I have a big problem, when I try to lock a row locked previouly, It wait
> until commit / rollback operation.
> 
>         How could lock a row if It is not locked already?
> 
>         Could I now if a row is locked?
> 
>         Could I get some error message from postgres when I do 'select ....
> for update' to a locked row instead of wait for commit / rollback?

It is theoretically possible to write a function is_locked and then do

select .... for update where not is_locked(); 

and thereby lock only not-yet-locked functions.

------------------
Hannu


pgsql-hackers by date:

Previous
From: Hannu Krosing
Date:
Subject: Re: Optimisation deficiency: currval('seq')-->seq scan, constant-->index scan
Next
From: "Ross J. Reedstrom"
Date:
Subject: Re: Re: [GENERAL] +/- Inf for float8's