Re: Long running DDL statements blocking all queries

Поиск
Список
Период
Сортировка
От Jeff Janes
Тема Re: Long running DDL statements blocking all queries
Дата
Msg-id CAMkU=1w5uUt0hAVHbvYg55vDHOYZsffAX9Ctnd8FMqsf2Va=RA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Long running DDL statements blocking all queries  (Ashu Pachauri <ashu210890@gmail.com>)
Список pgsql-general
On Thu, May 31, 2018 at 9:19 AM, Ashu Pachauri <ashu210890@gmail.com> wrote:
There was too much noise in the pg_stat_activity output, so I did not post it. I'll collect the output again and post. 

But, when I checked in pg_stat_activity, PID 18317 is the session that's running the ALTER statement and it was showing up as "active". So, it's not blocked by anything, but the fact that the ALTER statement is long running and it's blocking the operations that are not even on the same table for the entire duration it's running is troubling.


I think what you really need to know here is what lock it was holding which was blocking everyone.  That information won't be found in the pg_stat_activity.  It will be found in pg_locks, but the specific query you ran on that view did not display the columns with that information.  You need to include all the columns in the output which you used to join the two pg_locks together.  Yes, it will be voluminous, and most of them will not be relevant, but you don't know which ones are relevant until after you see the output.

Cheers,

Jeff

В списке pgsql-general по дате отправления:

Предыдущее
От: Jeff Janes
Дата:
Сообщение: Re: LDAP authentication slow
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Code of Conduct plan