Re: Row Level Locking Problem

From: Hannu Krosing <hannu(at)tm(dot)ee>
To: Cray2 <cray2(at)mail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Row Level Locking Problem
Date: 2000-08-21 15:40:05
Message-ID: 39A14D55.EE60D5F@tm.ee
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Mark Hollomon 2000-08-21 15:47:54 functional index arg matching patch
Previous Message Hannu Krosing 2000-08-21 15:37:38 Re: Optimisation deficiency: currval('seq')-->seq scan, constant-->index scan