Re: Postgres log configuration for locking

From: Jerry Sievers <gsievers19(at)comcast(dot)net>
To: Raj Gandhi <raj01gandhi(at)gmail(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Postgres log configuration for locking
Date: 2014-12-03 21:26:06
Message-ID: 868uiofms1.fsf@jerry.enova.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Raj Gandhi <raj01gandhi(at)gmail(dot)com> writes:

> I’m using Postgres 9.1 and enabled the log configuration param ‘log_lock_waits’.
>  
> However, it only logs the session which is waiting for the lock longer than ‘deadlock_timeout’. It doesn’t log the session which acquired the lock? 
>  
> Is there a way to log the session that acquired the lock along with the session which is waiting for the lock?

Do you assume there is but 1 single session blocking the waiter?

False in cases where some N number of sessions are all holding less
invasive locks and you are pending on a heavier one.

To wit; share locks granted and an exclusive locker pending.

The question in regards to whether it's possible to log more info
here in any case isn't something I can answer personally.

HTH

>  
> Thanks,
> Raj
>
>  
>

--
Jerry Sievers
Postgres DBA/Development Consulting
e: postgres(dot)consulting(at)comcast(dot)net
p: 312.241.7800

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Khangelani Gama 2014-12-04 14:22:21 Postgres 9.2.4 : psql: symbol lookup error: psql: undefined symbol: PQconnectdbParams
Previous Message Raj Gandhi 2014-12-03 20:07:12 Postgres log configuration for locking