pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kurt Roeckx <Q@ping.be>
To: pgsql-sql@postgresql.org
Subject: Selecting a non-locked row.
Date: Sun, 19 Jan 2003 14:33:20 +0100
Message-ID: <20030119133320.GA3984@ping.be> (raw)

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?


Kurt




view thread (5+ messages)  latest in thread

Message-ID: <20030119133320.GA3984@ping.be>
Permalink:  ../20030119133320.GA3984@ping.be/
Also on:    postgresql.org/message-id/20030119133320.GA3984@ping.be

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: Q@ping.be
  Subject: Re: Selecting a non-locked row.
  In-Reply-To: <20030119133320.GA3984@ping.be>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox