Re: Feature: FOR UPDATE SKIP LOCKED

From: Csaba Nagy <nagy(at)ecircle-ag(dot)com>
To: Postgres general mailing list <pgsql-general(at)postgresql(dot)org>
Cc: Jonathan Bond-Caron <jbondc(at)gmail(dot)com>
Subject: Re: Feature: FOR UPDATE SKIP LOCKED
Date: 2008-07-09 08:10:58
Message-ID: 1215591058.2311.21.camel@PCD12478
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, 2008-07-09 at 00:48 -0400, Tom Lane wrote:
> "Jonathan Bond-Caron" <jbondc(at)gmail(dot)com> writes:
> > It would be quite useful to implement a database queue. Although FOR UPDATE
> > NOWAIT and trying again can work as well as other techniques,
>
> > just skipping over the locks has its advantages (simplicity and zero wait)
>
> And disadvantages, such as complete lack of predictability or failure
> detection.

Well, it's not like SQL is completely predictable in general... think
about ordering of results. Such a feature would definitely help queue
like table processing, and the fact that it is predictably unpredictable
should not be a surprise for anybody using such a feature...

Cheers,
Csaba.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2008-07-09 08:21:28 Re: plpgsql - or operator?
Previous Message Artacus 2008-07-09 07:31:04 Re: Getting source code for database objects