Re: pg_locks: who is locking ?

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: pg_locks: who is locking ?
Дата
Msg-id 20061016210203.GE27790@alvh.no-ip.org
обсуждение исходный текст
Ответ на pg_locks: who is locking ?  (Alexandre Arruda <alepaes@aldeiadigital.com.br>)
Ответы Re: pg_locks: who is locking ?  (Alexandre Arruda <alepaes@aldeiadigital.com.br>)
Список pgsql-general
Alexandre Arruda wrote:
> Hi,
>
> My Database have a lot of locks not granted every moments in a day.
>
> Can I create a view that returns someting like this ?
>
> User    Granted    Table    Who_is_locking_me  PID
> ----    -------    -----    -----------------  ---
> joe    f    foo    frank              1212
> jeff    f    foo    frank              1313
> ann    f    foo    frank              1414
> frank    t    foo                   1111
> (...)
>
> (Or the locked transactions, if the table cold't be retrived)

You can look up more data about a backend by joining pg_locks to
pg_stat_activity, using the PID (I think it's called procpid on one view
and pid on the other).

--
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

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

Предыдущее
От: Jorge Godoy
Дата:
Сообщение: Re: RES: Dates rejected
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: A query planner that learns