Re: Need help understanding pg_locks
Bruce Momjian <bruce@momjian.us>
From: Bruce Momjian <bruce@momjian.us>
To: Florian Pflug <fgp@phlo.org>
Cc: Andrew Dunstan <andrew@dunslane.net>, Tom Lane <tgl@sss.pgh.pa.us>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2011-07-14T20:18:09Z
Lists: pgsql-hackers
Attachments
- /rtmp/doc4.diff (text/x-diff)
Florian Pflug wrote: > I still believe the chance of confusion to be extremely small, but since > you feel otherwise, what about "Targeted" instead of "Locked". As in > > OID of the relation targeted by the lock, or null if the lock does not > target a relation or part of a relation. > > Page number within the relation targeted by the lock, or null if the > lock does not target a tuple or a relation page. > > Virtual ID of the transaction targeted by the lock, or null if the lock > does not target a virtual transaction ID. > > "Protected"/"protects" instead of "Targeted"/"targets" would also work. > > Both avoid the imprecision of saying "Locked", and the ambiguity "on" - > which might either mean the physical location of the lock, or the object > its protecting/targeting. > > > I reworded that line to: > > > > + OID of the relation of the lock target, or null if the lock is not > > I'm not a huge fan of that. IMHO " .. of .. of .. " chains are hard to > read. Plus, there isn't such a thing as the "relation of a lock target" - > the relation *is* the lock target, not a part thereof. Agreed. I like "targeted by". New patch attached. -- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + It's impossible for everything to be true. +