Re: pg_locks needs a facelift - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: pg_locks needs a facelift
Whole thread Raw
In response to Re: pg_locks needs a facelift  ("Merlin Moncure")
List pgsql-hackers
On Mon, May 02, 2005 at 01:12:06PM -0400, Merlin Moncure wrote:

> I don't like the idea of listing user locks with 'tuple' locks for no
> other reason than this might confuse what user locks are. Even though
> they will be used as tuple locks 99% of the time, user locks are only
> loosely coupled with tuples in part because there is no sytem generated
> column which is persistent and > 32 bits.  IMO, this is a problem with
> the current user lock encourages locking over oid which is a
> bad practice.

Another way would be to allow user locks to use the four fields of
LOCKTAG.  So the user would be able to establish more powerful
conventions: say the relation's Oid, and a related sequence value if
there is one; or a blocknumber/offset (ctid) if there isn't, etc.

>  A properly implemented user lock system would likely
> maintain a global sequence shared by all lockable objects, tuple or
> otherwise.

That'd just be equivalent to require that user tables are created WITH
OIDS, only the counter wouldn't be shared with system tables ... how is
that any better?

Alvaro Herrera (<alvherre[@]>)
"Ellos andaban todos desnudos como su madre los parió, y también las mujeres,
aunque no vi más que una, harto moza, y todos los que yo vi eran todos
mancebos, que ninguno vi de edad de más de XXX años" (Cristóbal Colón)

pgsql-hackers by date:

From: "Marc G. Fournier"
Subject: Re: [pgsql-advocacy] Increased company involvement
From: Bruce Momjian
Subject: Re: [pgsql-advocacy] Increased company involvement