Re: Let's invent a function to report lock-wait-blocking PIDs

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Greg Stark <stark(at)mit(dot)edu>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Let's invent a function to report lock-wait-blocking PIDs
Date: 2013-03-25 19:51:18
Message-ID: 20130325195118.GE17029@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Mar 21, 2013 at 12:03:21AM +0100, Dimitri Fontaine wrote:
> Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:
> >> 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?
>
> It's too late for my brain to build the full answer, the idea is that we
> have another way to build the dependency cycles in the pg_locks query
> and then we can aggregate locks at each level and see about conflicts
> once we accumulated the data.
>
> Is that even possible? E_GOTOSLEEP.

Should this be a TODO?

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Grittner 2013-03-25 20:44:43 Re: Limiting setting of hint bits by read-only queries; vacuum_delay
Previous Message Brendan Jurd 2013-03-25 19:40:12 Re: [PATCH] Exorcise "zero-dimensional" arrays (Was: Re: Should array_length() Return NULL)