Re: obtaining row locking information - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: obtaining row locking information
Date
Msg-id 20050808144340.GB26979@alvh.no-ip.org
Whole thread Raw
In response to Re: obtaining row locking information  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: obtaining row locking information  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Mon, Aug 08, 2005 at 10:26:12AM -0400, Tom Lane wrote:
> Tatsuo Ishii <t-ishii@sra.co.jp> writes:
> > If I understand correctly, it seems the above method does show a
> > locked row's TID which does not block someone else. That is a little
> > bit different from what I expcted.
> 
> Well, it *could* be blocking someone else.  If there were more than one
> waiter for the same tuple, one of them would be holding the tuple lock
> (and blocked on the transaction ID of the actual holder of the tuple),
> and the other ones would be blocked on the first waiter's tuple lock.

All in all, Tatsuo is right in that there's no way to know what tuples
are locked without scanning the whole table.

-- 
Alvaro Herrera (<alvherre[a]alvh.no-ip.org>)
"Those who use electric razors are infidels destined to burn in hell while
we drink from rivers of beer, download free vids and mingle with naked
well shaved babes." (http://slashdot.org/comments.pl?sid=44793&cid=4647152)


pgsql-hackers by date:

Previous
From: Tatsuo Ishii
Date:
Subject: Re: obtaining row locking information
Next
From: Alvaro Herrera
Date:
Subject: Re: obtaining row locking information