From: | Dave Cramer <pg(at)fastcrypt(dot)com> |
---|---|
To: | Joost Kraaijeveld <J(dot)Kraaijeveld(at)Askesis(dot)nl> |
Cc: | pgsql-jdbc(at)postgresql(dot)org, pgsql-general(at)postgresql(dot)org |
Subject: | Re: [JDBC] Is what I want possible and if so how? |
Date: | 2006-07-03 18:08:50 |
Message-ID: | 1B97FB21-84A6-43FC-A2D4-85A51E14B80D@fastcrypt.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-jdbc |
Joost,
Everyone has to do a select for update, then they will be serialized.
Dave
On 3-Jul-06, at 6:45 AM, Joost Kraaijeveld wrote:
> 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
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster
>
From | Date | Subject | |
---|---|---|---|
Next Message | Joko Siswanto | 2006-07-03 18:22:37 | Re: How to Backup like in mysql or ms sql server |
Previous Message | Ian Harding | 2006-07-03 17:54:55 | Re: pgsql user change to postgres |
From | Date | Subject | |
---|---|---|---|
Next Message | Yann PICHOT | 2006-07-05 06:57:00 | Fwd: Diffrence between 8.0.3 and 8.1.3 |
Previous Message | Kris Jurka | 2006-07-03 15:43:15 | Re: Diffrence between 8.0.3 and 8.1.3 |