Re: Can pessimistic locking be emulated?

From: Rod Taylor <rbt(at)rbt(dot)ca>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Merlin Moncure <merlin(dot)moncure(at)rcsonline(dot)com>, Christoph Haller <ch(at)rodos(dot)fzk(dot)de>, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Can pessimistic locking be emulated?
Date: 2003-02-27 20:07:50
Message-ID: 1046376469.91396.84.camel@jester
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 2003-02-27 at 15:02, Tom Lane wrote:
> Rod Taylor <rbt(at)rbt(dot)ca> writes:
> > Agreed -- but they're stored on the row themselves. You might be able
> > to write a function which executes dirty reads on the table and tells
> > you if the row is locked or not, but it's not going to be simple.
>
> Actually, I don't think you need a dirty read at all. A locked row

I see. That will make it quite a bit easier then. Perhaps I'll write a
function sometime. It would make it useful for fetching things out of a
persistent work queue. Right now I deal with userlocks -- but those can
be clumsy.

--
Rod Taylor <rbt(at)rbt(dot)ca>

PGP Key: http://www.rbt.ca/rbtpub.asc

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-02-27 20:12:36 Re: analyze after a database restore?
Previous Message Tom Lane 2003-02-27 20:02:39 Re: Can pessimistic locking be emulated?