Re: Pet Peeves? - Mailing list pgsql-general

From Greg Smith
Subject Re: Pet Peeves?
Date
Msg-id Pine.GSO.4.64.0902031620411.1280@westnet.com
Whole thread Raw
In response to Re: Pet Peeves?  (Greg Stark <stark@enterprisedb.com>)
List pgsql-general
On Tue, 3 Feb 2009, Greg Stark wrote:

> Notably, there's no indication of which lock wait queue the ungranted
> locks are in. That means to find out what's blocking a lock would
> require comparing every other lock to it and deciding whether it
> conflicts.

The tool I find myself wanting here would parse pg_locks, find everything
that wasn't granted, scan through looking for the source of contention as
you describe, try to look up what any blockers are doing via
pg_stat_activity, then report on its findings.  That's not so difficult to
do by hand that I've bothered automating it completely for the occasional
time this pops up.

--
* Greg Smith gsmith@gregsmith.com http://www.gregsmith.com Baltimore, MD

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: C function question
Next
From: Simon Riggs
Date:
Subject: Re: Pet Peeves?