Re: Processing a work queue - Mailing list pgsql-general

From Merlin Moncure
Subject Re: Processing a work queue
Date
Msg-id b42b73150705010642u2f5c44d5had693effea88a3a@mail.gmail.com
Whole thread Raw
In response to Re: Processing a work queue  ("John D. Burger" <john@mitre.org>)
List pgsql-general
On 4/30/07, John D. Burger <john@mitre.org> wrote:
> Andrew - Supernews wrote:
>
> >> Anyone have any ideas on how to handle a work queue?
> >
> > Advisory locks (userlocks in pre-8.2).
>
> Can someone explain why these are a better fit than whatever locks
> SELECT FOR UPDATE acquires?

They are fast, and can lock for sub-transaction durations, which is
sometimes useful when dealing with these types of problems.

merlin

pgsql-general by date:

Previous
From: Rich Shepard
Date:
Subject: Re: PG Books
Next
From: Alexander Kuprijanov
Date:
Subject: Re: dump-restore only one table