Re: Detail part for still waiting for lock log message - Mailing list pgsql-hackers

From Tarvi Pillessaar
Subject Re: Detail part for still waiting for lock log message
Date
Msg-id 521CD688.60105@gmail.com
Whole thread Raw
In response to Re: Detail part for still waiting for lock log message  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: Detail part for still waiting for lock log message  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
Thank you for feedback.

On 26.08.2013 22:20, Alvaro Herrera wrote:

> 1. this assumes there is only one holder, which is not correct.
> (Consider two backends holding shared lock on something and another one
> stuck trying to acquire exclusive)
Hmm, true. Then it's not that simple as I thought in first place.
I guess it is possible to find all those backends that are holding that 
shared lock, but i'm not sure about the usefulness anymore as this list 
can be huge.

> 2. I think pgstat_get_backend_current_activity() can be helpful.
Yes, I saw that function, but i also wanted tx start time.
> 3. Doesn't this risk excessive overhead?
About the overhead, i may be wrong, but i was thinking that that 
particular backend will be put to sleep anyway and also in normal 
workload such log messages are not very common (or at least shouldn't be).
>   Can the other backends be gone
> (or done with the lock) before the report has completed?  If this
> happens, is there a problem?
That's why i have added check if other backend is found etc, but maybe i 
missed something. This is one of reasons why i wanted feedback.


Regards
Tarvi Pillessaar



pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Freezing without write I/O
Next
From: Greg Smith
Date:
Subject: Re: Backup throttling