Re: using database for queuing operations?

From: John Sidney-Woollett <johnsw(at)wardbrook(dot)com>
To: "Jim C(dot) Nasby" <decibel(at)decibel(dot)org>
Cc: Chris Gamache <cgg007(at)yahoo(dot)com>, pgsql-general(at)postgresql(dot)org, Mark Harrison <mh(at)pixar(dot)com>, Jeff Amiel <jamiel(at)istreamimaging(dot)com>
Subject: Re: using database for queuing operations?
Date: 2004-09-21 06:15:08
Message-ID: 414FC6EC.10708@wardbrook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Oracle also has the NOWAIT option for use with the SELECT ... FOR UPDATE
query. If the record is locked, the NOWAIT causes the query to generate
an exception (rather than blocking) which can then be caught and handled
- it helps prevent race conditions. A very nice feature!

John Sidney-Woollett

Jim C. Nasby wrote:
> What's the race in the SELECT FOR UPDATE?
>
> BTW, this is one nice thing about Oracle... it comes with a built-in
> queuing mechanism. It would probably be worth trying to write a generic
> queuing system and stick it in Gborg.
>
> Incidentally, Oracle also supports user-named locks, which would
> probably make this easier to do. LOCK TABLE works, but it's more brute
> force than is needed. Unfortunately, I don't see a way to simply add
> such a thing onto PostgreSQL without adding it to the core.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Michael Paesold 2004-09-21 10:15:42 Re: psql + autocommit
Previous Message Dennis Gearon 2004-09-21 05:54:07 basics on User Defined Functions