Tom Lane wrote:
> Florian Pflug <[email protected]> writes:
> > On Jul11, 2011, at 05:47 , Bruce Momjian wrote:
> >> Thank you. I think my confusion is that virtualtransaction is the lock
> >> holder/waiter, and the other two are actual locks. The attached doc
> >> patch clarifies that. I had actually realized this a few weeks ago and
> >> forgot, meaning this is pretty confusing.
>
> > For consistency, I guess it should say "lock object" instead of simply
> > "object" the description of all the columns up to (and including)
> > "objsubid", not only those of "virtualxid" and "transactionid".
>
> Yeah, I think this patch is going in the wrong direction altogether.
> It would be better to modify the description of virtualtransaction
> and pid to say that those are the "locking" entity.
OK, so as I understand it, in pg_locks:
Column | Type | Modifiers
--------------------+----------+-----------
locktype | text |
database | oid |
relation | oid |
page | integer |
tuple | smallint |
virtualxid | text |
transactionid | xid |
classid | oid |
objid | oid |
objsubid | smallint |
virtualtransaction | text |
pid | integer |
mode | text |
granted | boolean |
It is the last four that are related to the "locking entity". I don't
see a way of improving the description of the last four columns:
http://developer.postgresql.org/pgdocs/postgres/view-pg-locks.html
What was unclear to me was that the earlier columns (illogically)
vaguely represented the locked object.
--
Bruce Momjian <[email protected]> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ It's impossible for everything to be true. +
--
Sent via pgsql-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers