pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Joshua Tolley <eggyknap@gmail.com>
To: Bryce Nesbitt <bryce2@obviously.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: "slow lock" log in addition to log_min_duration_statement ?
Date: Fri, 12 Nov 2010 08:50:41 -0700
Message-ID: <4cdd6266.08c08e0a.59ee.ffffe39b@mx.google.com> (raw)
In-Reply-To: <4CDB007E.7010904@obviously.com>
References: <4CDB007E.7010904@obviously.com>

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

Attachments:

  [application/pgp-signature] signature.asc (196B, ../4cdd6266.08c08e0a.59ee.ffffe39b@mx.google.com/2-signature.asc)
  download

view thread (2+ messages)

Message-ID: <4cdd6266.08c08e0a.59ee.ffffe39b@mx.google.com>
Permalink:  ../4cdd6266.08c08e0a.59ee.ffffe39b@mx.google.com/
Also on:    postgresql.org/message-id/4cdd6266.08c08e0a.59ee.ffffe39b@mx.google.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: eggyknap@gmail.com, bryce2@obviously.com
  Subject: Re: "slow lock" log in addition to log_min_duration_statement ?
  In-Reply-To: <4cdd6266.08c08e0a.59ee.ffffe39b@mx.google.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox