Re: Patch: show relation and tuple infos of a lock to acquire - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Patch: show relation and tuple infos of a lock to acquire
Date
Msg-id CA+U5nM+_W7mpvg3NzZsWgcffz7jxz3XsxueQ60xq+c8Pvtme+w@mail.gmail.com
Whole thread Raw
In response to Patch: show relation and tuple infos of a lock to acquire  (Christian Kruse <christian@2ndQuadrant.com>)
Responses Re: Patch: show relation and tuple infos of a lock to acquire
List pgsql-hackers
On 31 December 2013 09:12, Christian Kruse <christian@2ndquadrant.com> wrote:

> Output w/o patch:
>
> LOG:  process 24774 acquired ShareLock on transaction 696 after 11688.720 ms
>
> Output with patch:
>
> LOG:  process 24774 acquired ShareLock on transaction 696 after 11688.720 ms
> CONTEXT:  relation name: foo (OID 16385)
>         tuple (ctid (0,1)): (1)

That is useful info.

I think the message should be changed to say this only, without a context line

LOG:  process 24774 acquired ShareLock on relation "foo" (OID 16385)
tuple (0,1) after 11688.720 ms

My reason is that pid 24774 was waiting for a *tuple lock* and it was
eventually granted, so thats what it should say. ALL locks wait for
the current transaction that holds the lock to complete, but only
tuple locks currently refer to a lock wait as a wait for a
transaction. That is confusing for users, as well as being
inconsistent with other existing messages.

Replacing the old text with the new info would represent a net
improvement in usefulness and understandability.

-- Simon Riggs                   http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services



pgsql-hackers by date:

Previous
From: Fabrízio de Royes Mello
Date:
Subject: Re: [PATCH] Store Extension Options
Next
From: Pavel Stehule
Date:
Subject: Re: [PATCH] Store Extension Options