Re: userlock changes for 8.1/8.2

From: "Jim C(dot) Nasby" <decibel(at)decibel(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Merlin Moncure <merlin(dot)moncure(at)rcsonline(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: userlock changes for 8.1/8.2
Date: 2005-01-25 04:40:40
Message-ID: 20050125044040.GX67721@decibel.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jan 24, 2005 at 10:43:40PM -0500, Tom Lane wrote:
> "Jim C. Nasby" <decibel(at)decibel(dot)org> writes:
> > Speaking of other tricks and things missing; I'd like to see support for
> > named locks.
>
> [ yawn... ] Create a table with a "name" column, put some rows in it,
> lock the rows.

What would guarantee that the OIDs of those rows don't conflict with
some other OIDs in the system?

BTW, this becomes a real issue if you're trying to write code that is
meant to be incorporated into other PostgreSQL applications, which might
also be using user_lock. Having a text-based means to identify locks
greatly reduces the odds of conflicting with a userlock being used by an
existing application.
--
Jim C. Nasby, Database Consultant decibel(at)decibel(dot)org
Give your computer some brain candy! www.distributed.net Team #1828

Windows: "Where do you want to go today?"
Linux: "Where do you want to go tomorrow?"
FreeBSD: "Are you guys coming, or what?"

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Min Xu (Hsu) 2005-01-25 04:43:29 Re: Concurrent free-lock
Previous Message Neil Conway 2005-01-25 03:54:50 bug w/ cursors and savepoints