Re: reporting reason for certain locks - Mailing list pgsql-hackers

From Tom Lane
Subject Re: reporting reason for certain locks
Date
Msg-id 20465.1290469869@sss.pgh.pa.us
Whole thread Raw
In response to reporting reason for certain locks  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Responses Re: reporting reason for certain locks
List pgsql-hackers
Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> A much more common ocurrence is tuple locks.  We block in an Xid in that
> case; and this has been a frequent question in the mailing lists and
> IRC.

> I think it would be very nice to be able to report something to the
> user; however, I'm not seeing the mechanism.

At least for tuple locks, the information is already visible, because we
have a "real" lock on the target tuple before we try to lock the current
holder's VXID.  So I think this isn't so much a question of needing more
low-level mechanism as one of providing a more useful view --- some kind
of self-join on pg_locks is needed.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: s/LABEL/VALUE/ for ENUMs
Next
From: Tom Lane
Date:
Subject: Re: s/LABEL/VALUE/ for ENUMs