Re: Patch: show relation and tuple infos of a lock to acquire

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Christian Kruse <christian(at)2ndquadrant(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Patch: show relation and tuple infos of a lock to acquire
Date: 2013-12-31 14:34:07
Message-ID: CA+U5nM+_W7mpvg3NzZsWgcffz7jxz3XsxueQ60xq+c8Pvtme+w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 31 December 2013 09:12, Christian Kruse <christian(at)2ndquadrant(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2013-12-31 16:03:33 Re: [PATCH] Store Extension Options
Previous Message Fabrízio de Royes Mello 2013-12-31 13:48:25 Re: [PATCH] Store Extension Options