Re: reporting reason for certain locks

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: reporting reason for certain locks
Date: 2010-11-22 23:51:09
Message-ID: 20465.1290469869@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2010-11-22 23:57:15 Re: s/LABEL/VALUE/ for ENUMs
Previous Message Andrew Dunstan 2010-11-22 23:48:53 Re: s/LABEL/VALUE/ for ENUMs