Re: Let's invent a function to report lock-wait-blocking PIDs - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Let's invent a function to report lock-wait-blocking PIDs
Date
Msg-id 25576.1363819583@sss.pgh.pa.us
Whole thread Raw
In response to Re: Let's invent a function to report lock-wait-blocking PIDs  (Dimitri Fontaine <dimitri@2ndQuadrant.fr>)
Responses Re: Let's invent a function to report lock-wait-blocking PIDs  (Dimitri Fontaine <dimitri@2ndQuadrant.fr>)
List pgsql-hackers
Dimitri Fontaine <dimitri@2ndQuadrant.fr> writes:
> Tom Lane <tgl@sss.pgh.pa.us> writes:
>> If we want a global view of the who-blocks-whom situation, I think we'll
>> need another approach.  But since this way solves isolationtester's
>> problem fairly neatly, I was hopeful that it would be useful for other
>> apps too.

> What about a function

>   pg_is_lock_exclusive(lock, lock) returns boolean
>   pg_is_lock_exclusive(lock[], lock[]) returns boolean

> I suppose that the lock type would be text ('ExclusiveLock'), but we
> could also expose a new ENUM type for that (pg_lock_mode).

I don't have an objection to providing such a function, but it doesn't
do anything for the problem beyond allowing getting rid of the hairy
case expression.  That's a good thing to do of course --- but what about
the indirect-blockage issue?
        regards, tom lane



pgsql-hackers by date:

Previous
From: Kevin Grittner
Date:
Subject: Re: Materialized view assertion failure in HEAD
Next
From: Dimitri Fontaine
Date:
Subject: Re: Let's invent a function to report lock-wait-blocking PIDs