Re: log_lock_waits to identify transaction's relation - Mailing list pgsql-hackers

From Stephen Frost
Subject Re: log_lock_waits to identify transaction's relation
Date
Msg-id 20130116034757.GD16126@tamriel.snowman.net
Whole thread Raw
In response to log_lock_waits to identify transaction's relation  (Simon Riggs <simon@2ndQuadrant.com>)
Responses Re: log_lock_waits to identify transaction's relation
List pgsql-hackers
Simon,

* Simon Riggs (simon@2ndQuadrant.com) wrote:
> Attached patch passes through further information about the lock wait,
> so we can display the following message instead
>    LOG: process %d acquired %s on transaction %u on relation %u of
> database %u after %ld.%03d ms

I love this idea.  Please take these comments as an initial/quick review
because I'd really like to see this get in.

A couple quick notes regarding the patch- what does
GetXactLockTableRelid really provide..?  This patch does use it outside
of lmgr.c, where XactLockTableRelid is defined.  Second, do we really
need to describeXact bool to DescribeLockTag..?  Strikes me as
unnecessary- if the information is available, include it.

Lastly, I really don't like the changes made to XactLockTableWait() and
friends.  They had a very clearly defined and simple goal previously and
the additional parameter seems to muddy things a bit, particularly
without any comments about what it's all about or why it's there.  I
understand that you're trying to pass the necessary information down to
where the log is generated, but it doesn't feel quite right.  Also, what
about VirtualXactLockTableWait()..?  Should that have a similar
treatment?
Thanks!
    Stephen

pgsql-hackers by date:

Previous
From: Claudio Freire
Date:
Subject: Re: Parallel query execution
Next
From: Stephen Frost
Date:
Subject: Re: Parallel query execution