Re: releaseOk and LWLockWaitForVar

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
Cc: Andres Freund <andres(at)2ndquadrant(dot)com>, heikki(at)anarazel(dot)de, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: releaseOk and LWLockWaitForVar
Date: 2014-06-24 04:56:38
Message-ID: CAA4eK1LeUWz_2oa+fzmvT-8kAaE4HddAfaCGd5_R78kXSDOgDQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jun 23, 2014 at 10:10 PM, Heikki Linnakangas <
hlinnakangas(at)vmware(dot)com> wrote:
> On 06/23/2014 05:38 PM, Amit Kapila wrote:
>>
>> While looking at function LWLockWaitForVar(), espacially below
>> code:
>>
>> TRACE_POSTGRESQL_LWLOCK_ACQUIRE(T_NAME(l), T_ID(l), LW_EXCLUSIVE);
>>
>> I think in this function tracing is done considering the Exclusive lock
>> is acquired, however it might have granted access because of
>> variable updation. Basically this function's trace doesn't distinguish
>> whether the access is granted due to the reason that there is no other
>> exclusive locker or variable is updated.
>
>
> Yeah. Not sure it's worth it to add new TRACE points for this, I'm not
really familiar with the way the traces work or how people use them.

Even if we don't want to add new trace points for new usage, I
think using existing might give wrong information to people who
want to use Dynamic tracing.

Another thing I have noticed is that docs are not updated for trace
macro's
TRACE_POSTGRESQL_LWLOCK_ACQUIRE_OR_WAIT
TRACE_POSTGRESQL_LWLOCK_ACQUIRE_OR_WAIT_FAIL

Information related to existing tracing macro's is present at below link:
http://www.postgresql.org/docs/devel/static/dynamic-trace.html

With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Noah Misch 2014-06-24 05:21:53 Re: Use a signal to trigger a memory context dump?
Previous Message Alvaro Herrera 2014-06-24 04:17:29 Re: ALTER TABLESPACE MOVE command tag tweak