Detail part for still waiting for lock log message
От | Tarvi Pillessaar |
---|---|
Тема | Detail part for still waiting for lock log message |
Дата | |
Msg-id | 52139795.1050105@gmail.com обсуждение исходный текст |
Ответы |
Re: Detail part for still waiting for lock log message
Re: Detail part for still waiting for lock log message |
Список | pgsql-hackers |
Hello! From time to time when investigating different locking issues using postgres log i have thought that "process x is still waiting for" message could be more informative, for example at the moment it is quite painful to find out which session was actually holding that particular lock. I would like to add detail part for this message to show information about the lock holder and also show what the lock holder is actually doing (yes, i know that i could get the lock holder's statement from the log, but this not the same, maybe lock holder was idle in transaction). So, i wrote a small patch, but i am not sure that this is the best/correct way to do it. Maybe someone can take a look at my patch and give some feedback. Even if this idea won't reach to upstream, i would still like to get feedback. About patch: Patch is tested against 9.2.4. I was not sure that i should check if the lock holder's proclock was found (as lock holder's proclock should be always there), check is there to be on the safe side, but maybe it's unnecessary. If it's not needed then fallback to old behavior (logging without detail) is not needed as well. And yes, i know that the lock holding time is not actually correct and it actually shows milliseconds since transaction start. Regards, Tarvi Pillessaar
Вложения
В списке pgsql-hackers по дате отправления: