Re: Long (really long) queries and not sure how to diagnose

Поиск
Список
Период
Сортировка
Искать
От
Tony Day
Тема
Re: Long (really long) queries and not sure how to diagnose
Дата
Msg-id
l2t22eb2d871004292224hef0a1dfas6068c40c57284d6a@mail.gmail.com
Список
Дерево обсуждения
Long (really long) queries and not sure how to diagnose Tony Day <tonyd@panztel.com>
Re: Long (really long) queries and not sure how to diagnose Tom Lane <tgl@sss.pgh.pa.us>
Hi Tom


Best guess from here is that some transaction took a write-preventing
lock on that table, and then sat on it for a really long time.  If this
were still going on, a look into pg_stat_activity and/or pg_locks would
quickly prove or refute that theory.  Since it's not, there's probably
not much you can do right now unless you have complete query logs to
study.  What I'd suggest is familiarizing yourself with those views
so you'll be better prepared to investigate next time.


Thanks for the response.

I have looked at pg_stat_activity previously but I had never heard of pg_locks before.
Having said that, looking and knowing what to look for are quite different :-)
I will spend some time trying to get to know both.

I am not sure what you mean by "complete query logs" but I do have a 1.3G Postgresql log file from the day in question.
Is there a particular way that a "write-preventing lock" will be logged that I can search for in that file?

Regards, Tony

В списке pgsql-novice по дате отправления
От: Tom Lane
Дата:
От: Tom Lane
Дата:
FAQ