pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Joost Kraaijeveld <J.Kraaijeveld@Askesis.nl>
To: pgsql-jdbc@postgresql.org
To: pgsql-general@postgresql.org
Subject: Is what I want possible and if so how?
Date: Mon, 03 Jul 2006 12:45:45 +0200
Message-ID: <1151923545.6055.40.camel@localhost> (raw)

Hi,

I have a table with events that must be handled by multiple clients. It
does not matter which client handles an event, but no two clients may
handle the same event and an event may only handled once.  A client can
only determine the availability of an event by querying the database.
The access to the table should be queue-like with synchronization.

My idea was that a client should do a "SELECT" on the table and mark the
selected records as "being handled" to avoid double handling.

I have read the manual about "LOCK", "SET TRANSACTION" and "SELECT...FOR
UPDATE", but from what I understand, they cannot prevent a "SELECT" from
another client, based on the "SELECT".

Is there a way to make this possible?

TIA


-- 
Groeten,

Joost Kraaijeveld
Askesis B.V.
Molukkenstraat 14
6524NB Nijmegen
tel: 024-3888063 / 06-51855277
fax: 024-3608416
web: www.askesis.nl



view thread (6+ messages)  latest in thread

Message-ID: <1151923545.6055.40.camel@localhost>
Permalink:  ../1151923545.6055.40.camel@localhost/
Also on:    postgresql.org/message-id/1151923545.6055.40.camel@localhost

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: J.Kraaijeveld@Askesis.nl, pgsql-general@postgresql.org
  Subject: Re: Is what I want possible and if so how?
  In-Reply-To: <1151923545.6055.40.camel@localhost>
  References: <1151923545.6055.40.camel@localhost>

* 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