Re: Lock Wait Statistics (next commitfest) - Mailing list pgsql-hackers

From Jaime Casanova
Subject Re: Lock Wait Statistics (next commitfest)
Date
Msg-id 3073cc9b0909280014g55ac952cke351d806f9c9420b@mail.gmail.com
Whole thread Raw
In response to Re: Lock Wait Statistics (next commitfest)  (Mark Kirkwood <markir@paradise.net.nz>)
Responses Re: Lock Wait Statistics (next commitfest)
Re: Lock Wait Statistics (next commitfest)
Re: Lock Wait Statistics (next commitfest)
List pgsql-hackers
On Sat, Aug 8, 2009 at 7:47 PM, Mark Kirkwood <markir@paradise.net.nz> wrote:
>>>
>>>
>> Patch with max(wait time).
>>
>> Still TODO
>>
>> - amalgamate individual transaction lock waits
>> - redo (rather ugly) temporary pg_stat_lock_waits in a form more like
>> pg_locks
>>
> This version has the individual transaction lock waits amalgamated.
>
> Still TODO: redo pg_stat_lock_waits ...
>

it applies with some hunks, compiles fine and seems to work...
i'm still not sure this is what we need, some more comments could be helpful.

what kind of questions are we capable of answer with this and and what
kind of questions are we still missing?

for example, now we know "number of locks that had to wait", "total
time waiting" and "max time waiting for a single lock"... but still we
can have an inaccurate understanding if we have lots of locks waiting
little time and a few waiting a huge amount of time...

something i have been asked when system starts to slow down is "can we
know if there were a lock contention on that period"? for now the only
way to answer that is logging locks

about the patch itself:
you haven't documented either. what is the pg_stat_lock_waits view
for? and what are those fieldx it has?

i'll let this patch as "needs review" for more people to comment on it...

--
Atentamente,
Jaime Casanova
Soporte y capacitación de PostgreSQL
Asesoría y desarrollo de sistemas
Guayaquil - Ecuador
Cel. +59387171157


pgsql-hackers by date:

Previous
From: 노홍찬
Date:
Subject: how to use eclipse when debugging postgreSQL backend
Next
From: Abhijit Menon-Sen
Date:
Subject: Re: GRANT ON ALL IN schema