Re: pg_locks: who is locking ?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pg_locks: who is locking ?
Дата
Msg-id 7733.1161042677@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: pg_locks: who is locking ?  (Alexandre Arruda <alepaes@aldeiadigital.com.br>)
Ответы Re: pg_locks: who is locking ? (SOLVED!)  (Alexandre Arruda <alepaes@aldeiadigital.com.br>)
Список pgsql-general
Alexandre Arruda <alepaes@aldeiadigital.com.br> writes:
> But pg_stat_activity joined with pg_locks only give me informations
> about the lock itself.
> Realy, I want a (possible) simple information: Who is locking me ?

You need a self-join to pg_locks to find the matching lock that is held
(not awaited) by some process, then join that to pg_stat_activity to
find out who that is.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: datatype preceded by underscore creates array
Следующее
От: "Andras Simon"
Дата:
Сообщение: Permission problem with create tablespace