Re: Patch: Show process IDs of processes holding a lock; show relation and tuple infos of a lock to acquire - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: Patch: Show process IDs of processes holding a lock; show relation and tuple infos of a lock to acquire
Date
Msg-id CAHGQGwGVFGCpqpPbgjEG+tvas3y6Ayg+6XcKaTPpytB1gPOiiA@mail.gmail.com
Whole thread Raw
In response to Re: Patch: Show process IDs of processes holding a lock; show relation and tuple infos of a lock to acquire  (Christian Kruse <christian@2ndquadrant.com>)
Responses Re: Patch: Show process IDs of processes holding a lock; show relation and tuple infos of a lock to acquire
List pgsql-hackers
On Sat, Feb 1, 2014 at 7:41 PM, Christian Kruse
<christian@2ndquadrant.com> wrote:
> Hi,
>
> On 01/02/14 02:45, Fujii Masao wrote:
>
>>     LOG:  process 33662 still waiting for ShareLock on transaction
>> 1011 after 1000.184 ms
>>     DETAIL:  Process holding the lock: 33660. Request queue: 33662.
>> [... snip ...]
>>     LOG:  process 33665 still waiting for ExclusiveLock on tuple (0,4)
>> of relation 16384 of database 12310 after 1000.134 ms
>>     DETAIL:  Process holding the lock: 33662. Request queue: 33665
>>
>> This log message says that the process 33662 is holding the lock, but
>> it's not true.
>
> As the message says: first lock is waiting for the transaction, second
> one for the tuple. So that are two different locks thus the two
> different holders and queues. So...
>
>> Is this the intentional behavior?
>
> Yes, I think so.

Oh, yes. You're right.

I have other minor comments:

Since you added errdetail_log_plural(), ISTM that you need to update
sources.sgml.

>> While I'm griping, this message isn't even trying to follow the project's
>> message style guidelines.  Detail or context messages are supposed to be
>> complete sentence(s), with capitalization and punctuation to match.
>
> Hm, I hope I fixed it in this version of the patch.

Current message doesn't look like complete sentence yet... We would
need to use something like "Processes X, Y are holding while Z is waiting
for the lock.". I could not come up with good message, though..

Regards,

-- 
Fujii Masao



pgsql-hackers by date:

Previous
From: Jeevan Chalke
Date:
Subject: Re: patch: option --if-exists for pg_dump
Next
From: Christian Kruse
Date:
Subject: Re: Patch: Show process IDs of processes holding a lock; show relation and tuple infos of a lock to acquire