Re: Lock problem

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Lock problem
Дата
Msg-id 15185.1396452673@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Lock problem  ("Victor Sterpu" <victor@caido.ro>)
Ответы Re: Lock problem  ("Victor Sterpu" <victor@caido.ro>)
Список pgsql-general
"Victor Sterpu" <victor@caido.ro> writes:
> I have a problem that it seems to be very hard to debug.
> Problem is from some postgresql locks. I use PostgreSQL 9.1.8.

You haven't actually explained what your problem is.

> I runned this query to fid the locks:
> SELECT bl.pid AS blocked_pid, a.usename AS blocked_user, kl.pid AS
> blocking_pid, ka.usename AS blocking_user, a.current_query AS
> blocked_statement FROM pg_catalog.pg_locks bl JOIN
> pg_catalog.pg_stat_activity a ON a.procpid = bl.pid JOIN
> pg_catalog.pg_locks kl ON kl.transactionid = bl.transactionid AND kl.pid
> != bl.pid JOIN pg_catalog.pg_stat_activity ka ON ka.procpid = kl.pid
> WHERENOT bl.granted;

This query proves little.  It might find two different transactions
waiting for the same transactionid, but it doesn't show that one is
waiting for the other.  They could both be waiting for some third
transaction.

            regards, tom lane


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

Предыдущее
От: Igor Neyman
Дата:
Сообщение: Re: Lock problem
Следующее
От: Hannes Erven
Дата:
Сообщение: Re: Table Vacuum Taking a Long Time