Re: userlock changes for 8.1/8.2 - Mailing list pgsql-hackers

From Tom Lane
Subject Re: userlock changes for 8.1/8.2
Date
Msg-id 3558.1106667538@sss.pgh.pa.us
Whole thread Raw
In response to Re: userlock changes for 8.1/8.2  ("Merlin Moncure" <merlin.moncure@rcsonline.com>)
List pgsql-hackers
"Merlin Moncure" <merlin.moncure@rcsonline.com> writes:
> However, it would be nice to have system generated unique tuple
> identifier.  There isn't one currently that would fit in the userlock
> restriction of 48 bits.

Sure there is: the ctid of a row in an agreed-on table works fine.
The reason it's system-wide unique is that user_locks.c forcibly
includes your database OID in the lock tag.

It would be reasonable to allow user control of the lock's relId field
and maybe even dbId field, but that just takes an expansion of the API
for user_locks.c.  There's no need to put overhead on the rest of
Postgres for this.
        regards, tom lane


pgsql-hackers by date:

Previous
From: noman naeem
Date:
Subject: how to add a new column in pg_proc table
Next
From: Kenneth Marshall
Date:
Subject: Re: ARC patent