Re: Need help understanding pg_locks

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Florian Pflug <fgp(at)phlo(dot)org>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Need help understanding pg_locks
Date: 2011-07-14 20:18:09
Message-ID: 201107142018.p6EKI9g04856@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +

Attachment Content-Type Size
/rtmp/doc4.diff text/x-diff 5.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2011-07-14 20:25:56 Re: patch: enhanced get diagnostics statement 2
Previous Message Alvaro Herrera 2011-07-14 20:11:17 Re: patch: enhanced get diagnostics statement 2