Re: Processing a work queue

From: "Merlin Moncure" <mmoncure(at)gmail(dot)com>
To: "John D(dot) Burger" <john(at)mitre(dot)org>
Cc: "Postgres General" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Processing a work queue
Date: 2007-05-01 13:42:45
Message-ID: b42b73150705010642u2f5c44d5had693effea88a3a@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 4/30/07, John D. Burger <john(at)mitre(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Alexander Kuprijanov 2007-05-01 14:11:57 Re: dump-restore only one table
Previous Message Rich Shepard 2007-05-01 13:03:01 Re: PG Books