Re: lock weirdness

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: lock weirdness
Дата
Msg-id 15842.1080488671@sss.pgh.pa.us
обсуждение исходный текст
Ответ на lock weirdness  ("Marcus Andree S. Magalhaes" <marcus.magalhaes@vlinfo.com.br>)
Список pgsql-novice
"Marcus Andree S. Magalhaes" <marcus.magalhaes@vlinfo.com.br> writes:
> Got several locks of a kind that, as seen in postgres docs, "is not
> automatically acquired by any PostgreSQL command"

That part of the docs is speaking of locks on tables.  The locks that
are confusing you are not table locks, they are transaction-number
locks.  The guys who are blocked waiting for ShareLock on someone else's
transaction number are waiting for that transaction to complete,
evidently because they want to update some row it already updated.

In short, your real problem is that transaction 224384857 is being held
open instead of completing.

I'm not sure why the transaction holding that lock isn't showing up in
your output.  Possibly the join against pg_stat_activity is failing ---
there are a couple of possible reasons why pg_stat_activity might not
have a row for a backend.  Try looking at just pg_locks without the
join.

            regards, tom lane

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

Предыдущее
От: "Marcus Andree S. Magalhaes"
Дата:
Сообщение: lock weirdness
Следующее
От: Reshat Sabiq
Дата:
Сообщение: Re: Images in Database