Skip site navigation (1) Skip section navigation (2)

Re: "slow lock" log in addition tolog_min_duration_statement ?

From: Joshua Tolley <eggyknap(at)gmail(dot)com>
To: Bryce Nesbitt <bryce2(at)obviously(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: "slow lock" log in addition tolog_min_duration_statement ?
Date: 2010-11-12 15:50:41
Message-ID: 4cdd6266.08c08e0a.59ee.ffffe39b@mx.google.com (view raw or flat)
Thread:
Lists: pgsql-sql
On Wed, Nov 10, 2010 at 12:28:46PM -0800, Bryce Nesbitt wrote:
> I have a cluster with log_min_duration_statement set to log slow  
> queries. Presently what I'm tracking down is almost certainly a lock  
> problem.  Is there any analog of log_min_duration_statement for locks?   
> If there is a lock on a certain critical tables for more than a few  
> hundredths of a second I want to know.

You could try log_lock_waits:
http://www.postgresql.org/docs/8.3/interactive/runtime-config-logging.html#GUC-LOG-LOCK-WAITS

It's defined in terms of deadlock_timeout, and reducing that to "a few
hundredths of a second" like you're interested in might cause all kinds of
load from the deadlock detector.

--
Joshua Tolley / eggyknap
End Point Corporation
http://www.endpoint.com

In response to

pgsql-sql by date

Next:From: Ozer, PamDate: 2010-11-12 16:36:13
Subject: Re: Overlapping Ranges- Query Alternative
Previous:From: Marc MaminDate: 2010-11-12 08:57:48
Subject: Re: Overlapping Ranges- Query Alternative

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group