From: | Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl> |
---|---|
To: | Merlin Moncure <merlin(dot)moncure(at)rcsonline(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: pg_locks needs a facelift |
Date: | 2005-05-02 17:23:02 |
Message-ID: | 20050502172302.GA3353@dcc.uchile.cl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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 module...it 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[(at)]dcc(dot)uchile(dot)cl>)
"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)
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2005-05-02 17:28:46 | Re: [HACKERS] Increased company involvement |
Previous Message | Marc G. Fournier | 2005-05-02 17:22:49 | Re: [HACKERS] Increased company involvement |