Re: Selecting a non-locked row. - Mailing list pgsql-sql

From Josh Berkus
Subject Re: Selecting a non-locked row.
Date
Msg-id 200301191326.10285.josh@agliodbs.com
Whole thread Raw
In response to Selecting a non-locked row.  (Kurt Roeckx <Q@ping.be>)
Responses Re: Selecting a non-locked row.  (Kurt Roeckx <Q@ping.be>)
Re: Selecting a non-locked row.  ("D'Arcy J.M. Cain" <darcy@druid.net>)
List pgsql-sql
Kurt,

> I'm in the process of writing an application, and I'm not sure
> how to properly solve it.
>
> I have a table with records in, and they either still need to be
> processed or not.  Several people will be using the table at the
> same time.
>
> I was thinking about using a select .... for update limit 1, but
> the other persons will of course try to select the same record
> and wait until that one is released.  The locks are held for a
> long period of time.
>
> Is there a way to select a row that is not locked yet?

I'm a bit confused by your question.  Could you try explaining it another way,
possibly with SQL code examples?


--
-Josh BerkusAglio Database SolutionsSan Francisco



pgsql-sql by date:

Previous
From: Kurt Roeckx
Date:
Subject: Selecting a non-locked row.
Next
From: Kurt Roeckx
Date:
Subject: Re: Selecting a non-locked row.